CHAPTER 3
Data Types
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,
are byte, short, int, long,
float, double, char and
boolean.
The reference data types are arrays, classes, interfaces, enums and annotations. enums and annotations are introduced into the Java programming language from Java 5.
3.1 PRIMITIVE DATA ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access