O'Reilly logo

Java Enterprise in a Nutshell, Third Edition by William Crawford, Jim Farley

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

Literals

String literals are indicated with single quotes. For example:

JMSType = 'updateAck'

If you need to use a single quote in a string literal, you use two single quotes. For example:

JMSCorrelationID = 'Joe''s message'

Numeric literals are either integer values or floating-point values. Integer values follow the rules for Java integer literals. They are all numerals, with no decimal point, and can have a value in the same range as a Java long value. For example:

42, 149, -273

Floating-point literals follow the syntax of Java floating-point literals. They are all numerals with a decimal point:

3.14, 98.6, -273.0

or are in scientific notation:

31.4e-1, 6.022e23, 2.998e8

Literals can also be the Boolean values TRUE or FALSE.

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