Java Reference
In-Depth Information
primitive types In Java, integer, floating-point, Boolean, and character. (6)
relational operators In Java, < , <= , > , and >= are used to decide which of two
values is smaller or larger; they return true or false . (11)
return statement A statement used to return information to the caller. (19)
short-circuit evaluation The process whereby if the result of a logical operator
can be determined by examining the first expression, then the second
expression is not evaluated. (12)
signature The combination of the method name and the parameter list types.
The return type is not part of the signature. (18)
standard input The terminal, unless redirected. There are also streams for
standard output and standard error. (4)
static final entity A global constant. (20)
static method Occasionally used to mimic C-style functions; discussed more
fully in Section 3.6. (18)
string constant A constant that consists of a sequence of characters enclosed
by double quotes. (7)
switch statement A statement used to select among several small integral values.
(17)
type conversion operator An operator used to generate an unnamed temporary
variable of a new type. (10)
unary operators Require one operand. Several unary operators are defined,
including unary minus ( - ) and the autoincrement and autodecrement
operators ( ++ and -- ). (10)
Unicode International character set that contains over 30,000 distinct charac-
ters covering the principle written languages. (6)
while statement The most basic form of looping. (14)
Virtual Machine The bytecode interpreter. (4)
common errors
Adding unnecessary semicolons gives logical errors because the semi-
colon by itself is the null statement. This means that an unintended
semicolon immediately following a for , while , or if statement is very
likely to go undetected and will break your program.
1.
At compile time, the Java compiler is required to detect all instances in
which a method that is supposed to return a value fails to do so. Occasion-
ally, it provides a false alarm, and you have to rearrange code.
2.
A leading 0 makes an integer constant octal when seen as a token in
source code. So 037 is equivalent to decimal 31 .
3.
 
Search WWH ::




Custom Search