This chapter starts a systematic introduction to Java with a definition of language elements—identifiers, variables, literals, keywords, separators, and comments. It also describes Java types—primitive types and reference types. Special attention is applied to the String class, enum types, and arrays.
In this chapter, we will cover the following topics:
- What are the Java language elements?
- Comments
- Identifiers and variables
- Reserved and restricted keywords
- Separators
- Primitive types and literals
- Reference types and String
- Arrays
- Enum types
- Exercise – Variable declarations and initializations