First, Java keyword overview
Java has a total of 53 keywords, including 2 reserved words goto and Const.
all Java Keywords
| Serial number |
Key words |
Role |
Usage |
Description |
| 01 |
Public |
One of the access controls. Any other class has access to public. Default (not declared, fourth access control) is a package access permission |
For classes, methods, Field |
The class name declared by public must be the same as the file name |
| 02 |
Protected |
One of the access controls. Other classes and all subclasses in the same package have access rights |
For classes, methods, Field |
|
| 03 |
Private |
One of the access controls. Any other class including subclasses is inaccessible |
For classes, methods, Field |
|
| 04 |
Class |
|
|
|
| 05 |
Interface |
|
|
|
| 06 |
Abstract |
|
|
|
| 07 |
Implements |
|
|
|
| 08 |
Extends |
|
|
|
| 09 |
New |
|
|
|
| 10 |
Import |
|
|
|
| 11 |
Package |
|
|
|
| 12 |
Byte |
|
|
|
| 13 |
Char |
|
|
|
| 14 |
Boolean |
|
|
|
| 15 |
Short |
|
|
|
| 16 |
Int |
|
|
|
| 17 |
Float |
|
|
|
| 18 |
Long |
|
|
|
| 19 |
Double |
|
|
|
| 20 |
void |
|
|
|
| 21st |
Null |
|
|
|
| 22 |
True |
|
|
|
| 23 |
False |
|
|
|
| 24 |
If |
|
|
|
| 25 |
Else |
|
|
|
| 26 |
While |
|
|
|
| 27 |
For |
|
|
|
| 28 |
Switch |
|
|
|
| 29 |
Case |
|
|
|
| 30 |
Default |
|
|
|
| 31 |
Do |
|
|
|
| 32 |
Break |
|
|
|
| 33 |
Continue |
|
|
|
| 34 |
Return |
|
|
|
| 35 |
instanceof |
|
|
|
| 36 |
Static |
|
|
|
| 37 |
Final |
|
|
|
| 38 |
Super |
|
|
|
| 39 |
This |
|
|
|
| 40 |
Native |
|
|
|
| 41 |
Strictfp |
|
|
|
| 42 |
Synchronized |
|
|
|
| 43 |
Volatile |
|
|
|
| 44 |
Transient |
|
|
|
| 45 |
Try |
|
|
|
| 46 |
Catch |
|
|
|
| 47 |
Finally |
|
|
|
| 48 |
Throw |
|
|
|
| 49 |
Throws |
|
|
|
| 50 |
Enum |
|
|
|
| 51 |
Assert |
|
|
|
| Reserved words |
|
|
|
|
| 52 |
Goto |
|
|
|
| 53 |
Const |
|
|
|
Second, the Java keyword detailed
"Java Core Technology: Volume One" keywords