C H A P T E R  2

Java Syntax

The syntax of any language is the rules that any speaker of the language follows so that other speakers of that language can understand. In other words, syntax is a set of rules that all the speakers of a language agree to follow so that they can communicate. If you violate the rules, people listening to you are either going to ask, “Huh? What?” or think you're being silly (which might be appropriate in some settings but will often cause a problem).

Computer languages work in much the same way, except that they're never spoken (though I won't be surprised to see, or should I say hear, oral programming languages someday). If you decide to do your own thing, don't be surprised when your computer doesn't do what you ...

Get Java 7 for Absolute Beginners now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.