Chapter 3

Using the Basic Building Blocks


check Speaking the Java language: The API and the language specification

check Taking a first glance at Java code

check Understanding the parts of a simple program

check Documenting your code

“Bce мыcли, кoтopыe имeют oгpoмныe пocлeдcтвия вceгдa пpocты. (All great ideas are simple.)”


The quotation applies to all kinds of things — things like life, love, and computer programming. That’s why this chapter takes a multilayered approach. In this chapter, you get your first details about Java programming. And in discovering details, you’ll see the simplicities.

Speaking the Java Language

If you try to picture in your mind the entire English language, what do you see? Maybe you see words, words, words. (That’s what Hamlet saw.) Looking at the language under a microscope, you see one word after another. The bunch-of-words image is fine, but if you step back a bit, you may see two other things:

  • The language’s grammar
  • Thousands of expressions, sayings, idioms, and historical names

The first category (the grammar) includes rules like, “The ...

Get Java For Dummies, 7th Edition now with O’Reilly online learning.

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