Java keywords are special reserved words that have predefined meanings in the Java compiler. They form the foundation of the language syntax and cannot be used as identifiers.
Keywords are special reserved words with predefined meaning to the Java compiler.
They help the compiler understand what your source code is trying to perform.
Keywords cannot be used as identifiers like class names, methods, or variables.
Here is the complete list of Java keywords:
| abstract | continue | for | new |
| switch | assert | default | goto |
| package | synchronized | boolean | do |
| if | 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 |
Topic: Keywords | Language: Java