Everything from the start marker of a comment block
(e.g. /*) is ignored until the first occurrence of
the matching end marker (*/).
The "throw" statement can only
throw "Throwable" objects. A NullPointerException
will be thrown if the Exception given to the "throw" statement results in
same statement you can use decimal, octal and/or
creating a multidimensional array, dimensions must
be created left to right. So,
int   array = new
int  ; is not valid.
Elements of an un-initialized array object get the
default value corresponding to the type of the
elements. Whether the array object reference is a
local or member variable, does not matter.
switch statement the
type of the case labels must be assignable to the
type of switch
not possible to break out of an "if" statement. If the "if" statement is placed
within a labeled block, a
switch statement or a loop construct, the
usage of "break" would
The "if" statement does not return
"continue" cannot be used
outside the context of a loop.
variable declared in a "try"
block is not visible in "catch"
or "finally" block.
extends B and B extends A, then it is not possible
to call a method of A ( implemented in all the three
classes ) from an instance method in class C.
object that has been eligible for garbage collection
may stop being eligible for garbage collection and
return to normal life. This happens if the call to
the finalize() reestablishes a reference from the
active part of the program to the object.
class has a final blank
variable, then it must be initialized when an
instance is created ( in all the constructors or any
initializer ) , or else the code will fail to
thread's status (user or daemon) can be changed
before the thread is started. Changing the status of
a thread already started throws
exception which is not thrown in the "try" block (for example,
thrown in a "catch"
block) is not handled by subsequent "catch" blocks, but will
rather be sent to the caller of the method. Before
this happens, "finally"
block is executed. Subsequent code after "finally" remains unreached if
that exception remains uncaught after the execution
of "finally" block.
or more interfaces declare a variable with the same
name, then a class implementing these interfaces
cannot refer to that variable by its simple name as
it leads to ambiguity (even if the values of the
variable is same in both the interfaces ). The
ambiguity can be avoided by using fully qualified
names e.g. Interface1.varName and
object can be eligible for garbage collection even
if there are references pointing to the object, as
long as the objects with the references are
themselves eligible for garbage collection.
unary post-fix operators and all binary operators,
except for assignment operators, associate from left
to right. All other operators associate from right
Floating point modulo (%) by zero produces NaN , but
floating point divide by zero does not.
Integer division truncates to the next lower integer
value in the absolute sense, but division by right
shifting truncates to the next lower integer value
in an algebraic sense. So, -7/2 == -3 but -7 >> 1 ==
methods cannot be "abstract",
abstract method cannot
a thread has started, it will continue to run even
if its reference is set to null. A running thread
has a reference in a ThreadGroup even if your
program does not retain one. Thus a running thread
is never garbage collected.
NullPointerException is thrown when an application
attempts to use null in a case where an object is
reference may be used to access a
static variable or
local class cannot have any access modifier.
The "this" variable is not a
normal reference variable that can be changed by
statements like this =
new A(); "this"
cannot be used to refer to local variables.