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 ...
Get Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.