O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Non-Token Input Elements

Now that you've seen the various types of tokens in Java, let's complete the discussion with a look at the only input elements in your source code that aren't classified as tokens. As was stated when tokens were defined previously, whitespace and comments are the two non-token element types.

Whitespace

Of some importance to most languages is the use of whitespace. Whitespace is any character that is used just to separate text—a space, tab, form feed, line feed, or carriage return.

In Java, whitespace can be inserted almost anywhere within an application's source code without affecting the meaning of the code to the compiler. The only place that whitespace cannot be used is within an identifier, such as a variable or class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required