1. Data Type = Primitive type + Reference type
// going to focus on the primitive type for now
2. Primitive type = Integer + Float + Character + Boolean
// going to focus on the integer for now
3. Integer = byte + short + int + long
3-1. byte = 1 byte, (-128) ~ 127
// 1 byte = 8 bits
3-2. short = 2 bytes, (-32768) ~ 32767
3-3. int = 4 bytes, (-2147483648) ~ 2147483647
// around +/- 2.1 billions
3-4. long = 8 bytes, (- 9223372036854775808L) ~ 9223372036854775807L
// adding "L" as a suffix which tells Java this is a long
// normally Java would assume the numbers in int type, so we need to tell him about it
'(Pre-class)' 카테고리의 다른 글
Can you do it youself? (0) | 2025.03.25 |
---|---|
What is the Character Data Type? (0) | 2025.03.25 |
How to setup Eclipse IDE? (0) | 2025.03.25 |
What is the Variables? (0) | 2025.03.24 |
What is the OOP? (0) | 2025.03.24 |