Literal
A value that is written itself in the source code.
Related concepts: Value
Closest Wikipedia entry: Literal (computer programming)
Misconceptions about Literal18 documented Misconceptions
Check YourselfArrayInitializerContentsInBrackets
Array initializers list the elements in square bracketsBoxedNull
Passing null to a wrapper class constructor creates an object representing the absence of a valueLargeIntegerLong
Large integer numbers have type longLiteralNoExpression
A literal is not an expressionLiteralString
When passing a literal string as argument to a method, no quotes are neededNoAtomicExpression
Expressions must consist of more than one pieceNoCallOnStringLiteral
One cannot invoke methods on String literalsNoCharEscape
\ is a normal character in char and String literalsNoFloatLiterals
There are no float literalsNoLongLiterals
There are no long literalsNullIsObject
null is an objectRationalLiterals
Rational fractions are literalsSingleQuoteString
String literals can be in single quotesStringLiteralNoObject
One needs to call the String constructor to get a String object from a literal