Keywords have a special meaning in a language, and are part of the syntax.

Reserved words are words that cannot be used as identifiers (variables, functions, etc.), because they are reserved by the language.

In practice most keywords are reserved words and vice versa. But because they're two different things it may happen that a keyword is not a reserved word (e.g. a keyword only has meaning in a special context, and can therefore be used as an identifier), or a reserved word is not a keyword (e.g. because it is reserved for future use).

Update: Some examples as given by others that illustrate the distinction:

  • In Java, goto is a reserved word but not a keyword (as a consequence, you cannot use it at all)
  • Fortran has no reserved words, all keywords (if, then, etc.) can be used as identifiers
Answer from molf on Stack Overflow
🌐
W3Schools
w3schools.com › java › java_ref_keywords.asp
Java Keywords
Java has a set of keywords that are reserved words that cannot be used as variables, methods, classes, or any other identifiers:
🌐
Wikipedia
en.wikipedia.org › wiki › List_of_Java_keywords
List of Java keywords - Wikipedia
October 20, 2025 - In the Java programming language, a keyword is any one of 68 reserved words that have a predefined meaning in the language. Because of this, programmers cannot use keywords in some contexts, such as names for variables, methods, classes, or as any other identifier.
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-keywords
Java Keywords - GeeksforGeeks
August 27, 2018 - In Java, keywords are the reserved ... some predefined actions. These words cannot be used as identifiers such as variable names, method names, class names, or object names....
🌐
Oracle
docs.oracle.com › javase › tutorial › java › nutsandbolts › _keywords.html
Java Language Keywords (The Java™ Tutorials > Learning the Java Language > Language Basics)
Here is a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. The keywords const and goto are reserved, even though they are not currently used.
🌐
ThoughtCo
thoughtco.com › reserved-words-in-java-2034200
Reserved Words in Java
January 27, 2019 - ... Reserved words are words that cannot be used as object or variable names in a Java program because they're already used by the syntax of the Java programming language. If you ttempt to use any of the words below as identifiers in your Java ...
🌐
TechVidvan
techvidvan.com › tutorials › keywords-in-java
Keywords in Java - Java Reserved Words - TechVidvan
June 5, 2020 - These are reserved for special purposes and we cannot use them as identifier names otherwise the compiler will give an error. In Java. there are 51 keywords, but 2 of them are not used which are-goto and const.
🌐
Wikipedia
en.wikipedia.org › wiki › Reserved_word
Reserved word - Wikipedia
October 17, 2025 - In an imperative programming language and in many object-oriented programming languages, apart from assignments and subroutine calls, keywords are often used to identify a particular statement, e.g. if, while, do, for, etc. Many languages treat keywords as reserved words, including Ada, C, ...
Find elsewhere
🌐
Javatpoint
javatpoint.com › java-reserved-keywords
Java Reserved Keywords - Javatpoint
Java Reserved Keywords with java tutorial, features, history, variables, object, programs, operators, oops concept, array, string, map, math, methods, examples etc.
🌐
How to do in Java
howtodoinjava.com › home › java basics › java reserved and contextual keywords
Java Reserved and Contextual Keywords
December 27, 2022 - Java has 51 reserved words and 16 contextual keywords that cannot be used as identifiers in the code. Programmers should not use these keywords for other purposes.
🌐
Medium
medium.com › @lk.snatch › java-reserved-keywords-29618c31a797
Java reserved keywords.
February 6, 2020 - Java reserved keywords. Programming languages have always reserved keywords, that cannot be used in a particular context. Wanna write «String class = “I can do anything!”»? You can write that …
🌐
Stack Overflow
stackoverflow.com › questions › 68555224 › what-is-the-difference-between-keywords-and-reserved-words-in-java
syntax - What is the difference between keywords and reserved words in Java? - Stack Overflow
The docs clearly says: Here is a list of keywords in the Java [...]. You cannot use any [...]. The keywords const and goto are reserved, even though they are not currently used..
🌐
Medium
medium.com › @rasulattar0705 › a-comprehensive-guide-to-java-reserved-words-b82a50569125
A Comprehensive Guide to Java Reserved Words | by Rasul Attar | Medium
December 12, 2024 - Keywords for defining and working with Java classes: class, interface, extends, implements, package, import ... All reserved words are lowercase. Java is case-sensitive, so reserved words like Int or InstanceOf are invalid.
🌐
DEV Community
dev.to › nadeerabinoli › keywords-vs-reserved-words-in-java-whats-the-difference-1lc2
Keywords vs Reserved Words in Java: What's the Difference? - DEV Community
May 29, 2025 - Every keyword is a reserve word, but all reserve words are not keywords!! Let's dig in to understand what this paradox means! Definition Keywords are predefined, reserved words that Java uses for specific functions.
🌐
Java Challengers
javachallengers.com › home › keywords vs reserved words in java
Keywords VS Reserved Words in Java
January 18, 2021 - In the most recent Java releases, reserved identifiers that can be used as a Java identifier. To make a comparison between the most recent reserved identifiers and the previous keywords or reserved words; reserved identifiers can be used as a class, method, or variable names and keywords can’t!
🌐
Computer Hope
computerhope.com › jargon › j › java_reserved_words.htm
What Are Java Reserved Words?
Java reserved words are keywords that are reserved by Java functions or other uses that cannot be used as identifiers (e.g., variable names, function names, class names).
🌐
Baptiste-wicht
baptiste-wicht.com › posts › 2010 › 02 › java-keywords.html
The reserved keywords of the Java Language | Blog blog("Baptiste Wicht");
February 3, 2010 - There is also an other kind of ... = new SimpleObject[x]; //... for(SimpleObject object : objects){ object.doSomething(); } ... This keyword is reserved but not used....
🌐
Edureka
edureka.co › blog › java-keywords
What are Java Keywords and reserved words? Edureka
June 17, 2021 - Keywords are predefined which have a unique meaning and functionality in Java programming language. These keywords are also known as reserved keywords which mean they cannot be used as a variable name, class, method or any other identifier. There are 57 reserved keywords in Java.
🌐
Tpoint Tech
tpointtech.com › java-reserved-keywords
Java Reserved Keywords - Tpoint Tech
Keywords are reserved words in Java that serve as a code key. These words can't be used for anything else because they're predefined. They can't be used as a...
🌐
Software Testing Help
softwaretestinghelp.com › home › java › important java keywords list – reserved words in java
Important Java Keywords List - Reserved Words In Java
April 1, 2025 - This entire output is the result of calling methods using the derived class objects. ... Answer: Keywords are also called as Reserved words. These are the words that the programming language uses for internal processing and pre-defined actions.