Data Types¶
Data Types in Java¶
Primitive data types: The primitive data types include boolean, char, byte, short, int, long, float and double.
Non-primitive data types: The non-primitive data types include Classes, Interfaces, and Arrays.
Java Primitive Data Types¶
In Java language, primitive data types are the building blocks of data manipulation. These are the most basic data types available in Java language.
boolean: Stores true or false values. Occupies 1 bit.
byte: 8-bit signed integer. Range: -128 to 127.
char: 16-bit Unicode character. Range: '\u0000' to '\uffff'.
short: 16-bit signed integer. Range: -32,768 to 32,767.
int: 32-bit signed integer. Range: -2^31 to 2^31-1.
long: 64-bit signed integer. Range: -2^63 to 2^63-1.
float: 32-bit single-precision floating-point. Used for decimal values.
double: 64-bit double-precision floating-point. Used for precise decimal values.
Short Video Lecture¶
(Video here)
VisualCodeChat Tutoring (Exercise: Convert String into Integer)¶
Interact and Learn with VisualCodeChat!
After-class Exercises¶
(Exercises here)