O'Reilly logo

Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition by Rolf W. Rasmussen, Khalid A. Mughal

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

2.2. Primitive Data Types

Figure 2.1 gives an overview of the primitive data types in Java.

Figure 2.1. Primitive Data Types in Java

Primitive data types in Java can be divided into three main categories:

  • Integral types— represent signed integers (byte, short, int, long) and unsigned character values (char)

  • Floating-point types (float, double)— represent fractional signed numbers

  • Boolean type (boolean)— represent logical values

Primitive data values are not objects. Each primitive data type defines the range of values in the data type, and operations on these values are defined by special operators in the language (see Chapter 3).

Each primitive ...

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