File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Section5OperatorExpression/Txt and Images Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ range of the target type. An integer literal can always be assigned to a long va
1414literal, you will need to explicitly tell the compiler that the literal value is of type long. You do this by appending
1515an upper- or lowercase L to the literal.
1616
17- Beginning with JDK 7, you can also specify integer literals using binary. To do so, prefix the value with 0b or 0B.
17+ Beginning with JDK 7, you can also specify integer literals using binary.
18+
19+ To do so, prefix the value with 0b or 0B.
1820For example, this specifies the decimal value 10 using a binary literal: int x = 0b1010;
1921
2022int x = 123_456_789;
@@ -44,4 +46,4 @@ and easy to use.
4446
4547The remainder a % b is defined such that (a / b) * b + a % b is always equal to a :
4648System.out.println(-15 % 2); // -1
47- System.out.println(15 % -2); // 1
49+ System.out.println(15 % -2); // 1
You can’t perform that action at this time.
0 commit comments