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

# 3.9. Keywords

50 character sequences, formed from ASCII letters, are reserved for use as keywords and cannot be used as identifiers ([§3.8](3.8.md)).

```
Keyword:
  (one of)
  abstract continue for new switch assert default if package synchronized boolean do goto private this break double implements protected throw byte else import public throws case enum instanceof return transient catch extends int short try char final interface static void class finally long strictfp volatile const float native super while
```

The keywords `const` and `goto` are reserved, even though they are not currently used. This may allow a Java compiler to produce better error messages if these C++ keywords incorrectly appear in programs.

While `true` and `false` might appear to be keywords, they are technically boolean literals ([§3.10.3](3.10.3.md)). Similarly, while `null` might appear to be a keyword, it is technically the null literal ([§3.10.7](3.10.7.md)).
