Official statement: Http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html to facilitate my direct copy over, the original text is as follows: Here's a list of Keywords in the Java programming language. The following is a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. You cannot use any of the following words to make a program identifier. The keywords const and goto are reserved, even though they is not currently used. The keyword const and GOTO statements are reserved, although they are not currently used. True, FALSE, and null might seem like keywords, but they is actually literals; You cannot use them as identifiers in your programs. True,false, and null appear to be keywords, but they are actually literal values; You cannot use them as program identifiers.
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 |
* |
|
Not used |
** |
|
Added in 1.2 |
*** |
|
Added in 1.4 |
**** |
|
Added in 5.0 |
Access control
- Private privately owned
- Protected protected
- public.
Class, method, variable modifier
- Abstract Declaration Abstraction
- Class
- Extends expansion, inheritance
- Final Ultimate, immutable
- Implements implementation
- Interface interface
- Native Local
- New, creating
- Static statics
- STRICTFP rigorous, precise
- Synchronized threads, synchronizing
- Transient short
- Volatile volatile
- Const
- Assert
Program Control statements
- Break jumps out of the loop
- Continue continue
- return returns
- Do run
- While loop
- If if
- else instead
- For loop
- instanceof Instances
- Switch switches
- Case returns the result in the switch
- Default Defaults
- Goto
Error handling
- Catch handling exception
- Finally there is no exception to execute
- Throw throws an exception object
- Throws declares an exception that may be thrown
- Try catch exception
Package related
- Import Introduction
- Package Packages
Basic type
- Boolean Boolean type
- byte byte type
- char character type
- Double dual precision,
- Float floating point
- int integral type
- Long integer type
- Short Quick-integer
Variable reference
- Super Parent class, Super class
- This class
- void no return value
- enum Enum type
Total: 3+15+13+5+2+8+4=50 A keyword, all lowercase conclusions:
- Const, goto is a keyword, although useless, but can not be taken as a variable name
- True, false, NULL is not a keyword, but it cannot be used when the variable name
- Friendly, sizeof is not a keyword, it can be used when the variable name
How many keywords are in Java