A keyword is the second of Java tokens listed in the Input types section. We have seen several Java keywords already—abstract, class, final, implements, int, interface, new, package, private, public, return, static, and void. Now we will present the full list of the reserved keywords. These keywords cannot be used as identifiers.
Reserved and restricted keywords
Reserved keywords
Here is the list of all 49 keywords of Java 9:
abstract | class | final | implements | int |
interface | new | package | private | public |
return | static | void | if | this |
break | double | default | protected | throw |
byte | else | import | synchronized | throws |
case | enum | instanceof | boolean | transient |
catch | extends | switch | short | try |
char | for | assert | do | finally |
continue... |