| Data Type | Description | Example |
|---|---|---|
| Integer (int) | Whole numbers (positive, negative, or zero) | 10, -25, 0 |
| Float (float) | Decimal numbers (single precision) | 3.14, -7.25 |
| Double (double) | Decimal numbers with higher precision | 3.1415926535 |
| Character (char) | Single character | 'A', '7', '#' |
| String | Sequence of characters | "Hello", "BPSC" |
| Boolean (bool) | Logical values | true, false |
| Byte | 8-bit integer | 127, -128 |
| Short | 16-bit integer | 32000 |
| Long | Large integer | 9876543210L |
| Void | No value or no return type | void main() |
| Data Type | Example |
|---|---|
| int | 25 |
| float | 12.5f |
| double | 45.6789 |
| char | 'K' |
| boolean/bool | true |
| byte | 100 |
| short | 25000 |
| long | 123456789L |
| Data Type | Example |
|---|---|
| String | "Computer" |
| Array | {10,20,30} |
| Class | Student s = new Student(); |
| Object | Car car = new Car(); |
| Interface | Runnable |
| Enum | MONDAY, RED |