JAVA has a total of 51 keywords including two reserved words
Specific content and functions of 51 keywords:
By Function
Access control:
1. private
2. protected
3. public
Class, method, and variable Modifier
4. abstract declaration Abstraction
5. class
6. extends extension and inheritance
7. final ultimate, unchangeable
8. implements implementation
9. interface
10. native local
11. new: Create
12. static
13. Strict and accurate strictfp
14. synchronized thread, synchronous
15. transient is short
16. volatile is easy to lose
Program Control statement
17. break Out Loop
18. continue
19. return
20. do run
21. while Loop
22. if
23. else vice versa
24. for Loop
25. instanceof instance
26. switch
27. Return the result of the switch in case
28. default
Error Handling
29. catch Exception Handling
30. execute any finally exceptions
31. throw an exception object
32. throws declares that an exception may be thrown.
33. try catch exceptions
Package-related
34. import
35. package
Basic Type
36. boolean
37. byte type
38. char character type
39. double precision,
40. float floating point
41. int integer
42. long Integer
43. short integer
44. null
45. true
46. false
Variable reference
47. super parent class, superclass
48. this class
49. void no return value
In addition, there are two reserved words
50. The const reserved keyword. It has no specific meaning and is used to define constants in c ++.
51. The goto reserved keyword has no specific meaning. It is used for jump in C ++.
Sort by letter
Keyword meaning
Abstract indicates that the class or member method has abstract attributes.
Assert for program debugging
One of the basic boolean data types.
Break jumps out of a block in advance
One of the basic data types of byte, the byte type
Use case in the switch statement to indicate a branch
Catch is used in exception handling to catch exceptions.
One of the basic char data types.
Class
The const reserved keyword. It has no specific meaning and is used to define constants in c ++.
Continue back to the beginning of a block
Default: default. For example, if it is used in a switch statement, it indicates a default friend.
Do is used in the do-while statement.
One of the basic double data types, double Floating Point Type
Else Is Used in condition statements to indicate the branch when the condition is not met
Enum Enumeration
Extends indicates that one type is a subclass of another type. The type here usually refers to the class and interface.
Final is used to describe final attributes, indicating that a class cannot be derived from a subclass, the member method cannot be overwritten, or the member field cannot be changed.
Finally is used to handle abnormal situations, and the cardiac and cerebral vessels declare a block of statements that will basically be executed
Float is one of the basic data types.
For a guiding word in a loop structure
The goto reserved keyword, which has no specific meaning. It is used for jump in C ++.
If condition statements
Implements indicates that a class implements the given interface
Import indicates to access the specified class or package
Instanceof is used to test whether an object is an instance object of the specified type.
One of the basic int data types, integer type
Interface
One of the long basic data types, long integer type
Native is used to declare that a method is implemented by a computer-related language.
New is used to create a new instance object.
Packgae package
Private: an access control method, private Mode
Protected is an access control method and protection mode.
Public Access Control Mode
Return data from the member Method
Short is a data type, short Integer type.
Static indicates that a static property exists.
Strictfp is used to declare that the FP-strict expression complies with the IEEE754 arithmetic specification.
Super indicates the reference of the parent type of the current object.
The guiding word of the switch branch structure statement
Synchronized indicates that a piece of code needs to be executed synchronously.
This references the current object
Throw an exception
Throws declare all the exceptions to be thrown in the currently defined member Methods
Transient declares non-serialized member Domains
Try a program block that may throw an exception
Void indicates that the current member method has no return value.
Volatile indicates that two or more variables must change synchronously.
While is used in the Loop Structure
Author: "huanggaole"