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