Home

Java Literals

|
Updated:  
2017-07-12 23:24:32
|
Java Essentials For Dummies
Explore Book
Buy On Amazon
In addition to its keywords, three of the words you use in a Java program are called literals. Each literal has a specific meaning in the language. You can't use a literal for anything other than its pre-assigned meaning.

The following table lists Java's literal words.

Literal What It Does
false One of the two values that a boolean expression can possibly have.
null The "nothing" value. If you intend to have an expression refer to an object of some kind, but the expression doesn't refer to any object, the expression's value is null.
true One of the two values that a boolean expression can possibly have.
The keywords and literal words are all called reserved words because each of these words is reserved for special use in the Java programming language.

About This Article

This article is from the book: 

About the book author: