Literals
String literals are indicated with single quotes. For example:
JMSType = 'updateAck'
If you need to use a single quote in a string literal, use two single quotes:
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:
42, 149, -273
Floating-point literals follow the syntax of Java floating-point literals. They are numerals with a decimal point:
3.14, 98.6, -273.0
They are also in scientific notation:
31.4e-1, 6.022e23, 2.998e8
Literals
can also be the boolean values true
or
false
.
Get Java Enterprise in a Nutshell, Second 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.