|
Click on the naviagation buttons on the left for information on a wide variety
if Java language issues.
Some things to remember:
- All Java statements end with a semicolon, ";", except
those enclosed by curly braces, "{" "}".
- All blocks of code that logically belong together as a single
enitity are enclosed in curly braces. For instance, the body
of a class definition, the body of a method definition, or the bodies of
an "if-else" construct, the body of a "for" or "while" loop.
- Don't forget to initialize your references to objects
before you use them! Otherwise you will get the
dreaded "Null Pointer Exception"!
- A class definition is just that, it does not instantiate an
object.
- The name of a variable being passed to a method does not
have to match the name of the variable used in the method
declaration.
- The type of the variable being passed to a method
does have to match the type of the corresponding argument in
the method declaration.
- For objects, a variable is just a reference to the actual object, a
"name" for it. A variable is not the actual
object.
- For primitive types, a variable does hold the actual value
however.
|