The most basic operation that a program in any programming language performs is manipulation of data. In order to achieve this, every programming language provides different types of data, operators and the syntax for valid statements. In this chapter, we discuss the various data types supported by the Java programming language.
All the data types in Java have been categorized into two—primitive data types and reference data types.
The primitive types, also known as built-in types,
The reference data types are arrays, classes, interfaces, enums and annotations. enums and annotations are introduced into the Java programming language from Java 5.