Literal
A value that is written itself in the source code.
Related concepts: Value
Closest Wikipedia entry: Literal (computer programming) — In computer science, a literal is a textual representation (notation) of a value as it is written in source code. Almost all programming languages have notations for atomic values such as integers, floating-point numbers, and strings, and usually for Booleans and characters; some also have notations for elements of enumerated types and compound values such as arrays, records, and objects. An anonymous function is a literal for the function type.
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