O'Reilly logo

The class of Java by Pravin Jain

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required