The document discusses different data types in Java including primitive types like boolean, char, byte, short, int, long, float and double as well as non-primitive types like classes, interfaces, and arrays. It notes that lower data types can be summed to higher types which return the higher data type and underscores are allowed in numbers. Non-primitive types are user-defined and reference types that can be created using the class keyword by defining properties and methods like in the Student data type example. The document also mentions value overflow and the var keyword introduced in Java 9 for local variables.
2. Data Types in Java
1. Primitive data types: The primitive data types include boolean, char,
byte, short, int, long, float and double.
2. Non-primitive/User Define data types: The non-primitive data types
include Classes, Interfaces, and Arrays.
3. Should Remember
1. Lower type summation with higher type return higher data type
2. Java allow underscore in number
3. Assigning Higher type in lower type variable is compilation error