Comprehend
- A variable holds a value, while an object reference variable points to the memory that holds the object.
- The short-circuit logical operators && and || operate only on boolean operands. For example, the expression
9&&7 will not compile. Understand the difference between short-circuit logical operators and bitwise operators.
- If the first expression of a && operator is false, the second expression is not evaluated, and if the first
expression of a || operator is true, the second expression is not evaluated.
Look Out
- Be on guard for words that are only slightly different from the
Java keywords, such as synchronize instead of synchronized, implement
instead of implements, and protect instead of protected.
- Whether an array stores primitive variables or object references, the array itself is always an object.
- It is illegal to include the array size in the array declaration.
- Division by zero generates a runtime ArithmeticException only if
the operands are integers. In case of float and double, the result of
division by zero is infinity.
- The result of the modulo operator always carries the sign of the first operand (i.e. the one before the operator);
you can ignore the sign of the second operand.
- You cannot instantiate an enum by using the new operator.
Memorize
- Know the Java language keywords.
- Know the range of values for all primitive data types.
- All primitive data types except boolean and char are signed.
- The first character of an identifier must be a letter, a dollar
sign ($), or an underscore (_). Characters other than the first
character in an identifier may be a letter, a dollar sign, an
underscore, or a digit.
|
|
| 日 | 一 | 二 | 三 | 四 | 五 | 六 |
---|
29 | 30 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|
常用链接
留言簿(1)
随笔分类(5)
随笔档案(13)
相册
Blog Roll
找到我
搜索
积分与排名
最新评论
阅读排行榜
评论排行榜
|
|