Literal

A literal is the source-code representation of a value of a primitive, String, or null. The Java Language Specification defines the lexical structure used for IntegerLiterals, FloatingPointLiterals, CharacterLiterals, and StringLiterals:

            IntegerLiteral:                                        see Java Language Specification...

            FloatingPointLiteral:                                  see Java Language Specification...

            CharacterLiteral:                                      see Java Language Specification...

            StringLiteral:                                         see Java Language Specification...

            BooleanLiteral:
        true
            false

            NullLiteral:
        null

            Literal:
        IntegerLiteral
            FloatingPointLiteral
            BooleanLiteral
            CharacterLiteral
            StringLiteral
            NullLiteral

Get Java Data Objects 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.