ENGLISH
REFERENCE

literal

n. countable
B2 Upper Intermediate US //ˈɫɪtɝəɫ// UK //lˈɪtəɹəl// lit·er·al

n. a fixed value written directly into computer code. You use this when you type an exact number or piece of text, like the number 5 or the word 'hello', instead of using a variable.

n. a notation for representing a fixed value directly within source code. It contrasts with variables or constants, as the value is explicitly stated rather than referenced by an identifier.


SIMPLE

The number 42 in your code is an integer literal.

CONTEXTUAL

When you assign a specific word to a variable, you must wrap the string literal in quotation marks so the computer understands it is text.

COMPLEX

In many programming languages, attempting to modify a string literal directly will result in a runtime error, as these values are typically stored in read-only memory.

Synonyms
Antonyms
Origin

From Middle English literal, from Old French literal, from Late Latin litteralis or literalis (“of or pertaining to letters or to writing”), from Latin littera or litera (“a letter”). See letter.

Usage

Typically preceded by a data type classifier, such as 'string', 'integer', or 'boolean'.

© 2026 English Reference