Java has 51 keywords, plus two reserved words; So there are 53 of them. This paper only lists and briefly introduces the keywords in Java, and the understanding of some keywords such as Sychronized will be analyzed separately in other articles.

Reserved words

Reserved keywords are reserved keywords.

  • Const is used to modify declarations of fields or local variables; Fields or local variables decorated with const are constant and cannot be modified
  • Goto specifies to jump to the tag, and when the tag is found, the program processes the commands starting on the next line.

The keyword

  • The data type

  • Access modifier

  • Class and interface definitions are related

  • Process control is about judgment

  • package

  • Variable class interface method modifier

  • Exception handling

  • Enumerations and assertions