December 1999
Intermediate to advanced
816 pages
20h 27m
English
You've already seen the basics of Java punctuation. Statements are ended with a semicolon (;). You can also use the comma to separate identifiers, like this:
int x, y, z; // This declares three ints, called x, y and z respectively
The other main punctuation you regularly use are curly braces . You use curly braces, followed by no punctuation, to delimit class definitions and method definitions, like this:
class Book
{
method checkOut()
{
} // End definition of method checkOut()
} // End of class definition for Book
Class definitions are not followed by a semicolon as a C struct or C++ class definition is. Also, as noted earlier, all the methods of a given class must be defined inside the curly braces that delimit the ...
Read now
Unlock full access