Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c48a51a

Browse files
Merge pull request Snailclimb#1911 from Horstson/patch-1
Update java-basic-questions-01.md
2 parents d75c49f + b9a3f99 commit c48a51a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎docs/java/basis/java-basic-questions-01.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Java 中有三种移位运算符:
263263

264264
当 int 类型左移/右移位数大于等于 32 位操作时,会先求余(%)后再进行左移/右移操作。也就是说左移/右移 32 位相当于不进行移位操作(32%32=0),左移/右移 42 位相当于左移/右移 10 位(42%32=10)。当 long 类型进行左移/右移操作时,由于 long 对应的二进制是 64 位,因此求余操作的基数也变成了 64。
265265

266-
也就是说:`x<<42`等同于`x<<10`,`x>>42`等同于`x>>10`,``x >>>42`等同于`i4 >>> 10`。
266+
也就是说:`x<<42`等同于`x<<10`,`x>>42`等同于`x>>10`,`x >>>42`等同于`x >>> 10`
267267

268268
**左移运算符代码示例** :
269269

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /