Chapter 3

Using the Basic Building Blocks

IN THIS CHAPTER

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.)”

—LEO TOLSTOY

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.