---
spec: JLS
title: "The Java Language Specification"
edition: "Java SE 19 Edition"
java_version: 19
chapter: "Chapter 3. Lexical Structure"
section: "3.10"
heading: "3.10. Literals"
parent: "Chapter 3. Lexical Structure"
source: https://docs.oracle.com/javase/specs/jls/se19/html/jls-3.html#jls-3.10
id: "3.10"
url: https://jvm.obfuscated.software/jls/se19/3.10.html
raw: https://jvm.obfuscated.software/jls/se19/3.10.md
---

# 3.10. Literals

A *literal* is the source code representation of a value of a primitive type ([§4.2](4.2.md)), the `String` type ([§4.3.3](4.3.3.md)), or the null type ([§4.1](4.1.md)).

```
Literal:
  IntegerLiteral
  FloatingPointLiteral
  BooleanLiteral
  CharacterLiteral
  StringLiteral
  TextBlock
  NullLiteral
```

**Sections:**

- [3.10.1. Integer Literals](3.10.1.md)
- [3.10.2. Floating-Point Literals](3.10.2.md)
- [3.10.3. Boolean Literals](3.10.3.md)
- [3.10.4. Character Literals](3.10.4.md)
- [3.10.5. String Literals](3.10.5.md)
- [3.10.6. Text Blocks](3.10.6.md)
- [3.10.7. Escape Sequences](3.10.7.md)
- [3.10.8. The Null Literal](3.10.8.md)
