2.7. Review notes

Primitive data types:

  • Java defines eight primitive data types: char, byte, short, int, long, float, double, and boolean.
  • Primitive data types are the simplest data types.
  • Primitive data types are predefined by the programming language. A user can’t define a primitive data type in Java.
  • It’s helpful to categorize the primitive data types as Boolean, numeric, and character data types.

The boolean data type:

  • The boolean data type is used to store data with only two possible values. These two possible values may be thought of as yes/no, 0/1, true/false, or any other combination. The actual values that a boolean can store are true and false.
  • true and false are literal values.
  • A literal is a fixed value that doesn’t need further ...

Get OCA Java SE 8 Programmer I Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.