You're building a user profile: age (whole number), height (decimal), first initial (single letter), premium member (yes/no). Each piece of data needs the right container - that's what primitive types are for.

Personal profile data

Store different types of information about a person.

Profile.java
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}
public class Profile {
    public static void main(String[] args) {
        int age = ;
        double height = ;
        char initial = ;
        boolean isStudent = ;
        
        System.out.println("Age: " + age);
        System.out.println("Height: " + height + "m");
        System.out.println("Initial: " + initial);
        System.out.println("Student: " + isStudent);
    }
}

Each type serves a purpose: int for count, double for measurement, char for single character, boolean for yes/no.

primitive Built-in types that hold simple values directly (not references to objects).
int 32-bit signed integer: -2,147,483,648 to 2,147,483,647
double 64-bit floating point: ~15 decimal digits of precision
boolean Only two values: `true` or `false`
char Single 16-bit Unicode character: `'A'`, `'7'`, `'@'`

Integer overflow

What happens when a number gets too big for its type?

Overflow.java
public class Overflow {
    public static void main(String[] args) {
        int bigNumber = 2000000000;
        int doubled = bigNumber * 2;
        
        System.out.println("Original: " + bigNumber);
        System.out.println("Doubled:  " + doubled);
        
        
    }
}

int can only hold values up to about 2 billion. Beyond that, it wraps around!

Floating point precision

Decimal numbers aren't always exact. This can surprise you.

Precision.java
public class Precision {
    public static void main(String[] args) {
        double a = 0.1;
        double b = 0.2;
        double sum = a + b;
        
        System.out.println("0.1 + 0.2 = " + sum);
        System.out.println("Equals 0.3? " + (sum == 0.3));
        
        // For money, use integer cents instead
        int cents1 = 10;
        int cents2 = 20;
        int totalCents = cents1 + cents2;
        System.out.println("10 + 20 cents = " + totalCents);
        
    }
}

0.1 + 0.2 isn't exactly 0.3 - floating point has tiny rounding errors.

Boolean flags

Booleans represent states and conditions - very useful for tracking status.

Booleans.java
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}
public class Booleans {
    public static void main(String[] args) {
        boolean isStudent = ;
        boolean hasLicense = ;
        int age = ;
        
        boolean isAdult = age >= 18;
        boolean canDrive = isAdult && hasLicense;
        boolean getsDiscount = isStudent || age < 18;
        
        System.out.println("Adult: " + isAdult);
        System.out.println("Can drive: " + canDrive);
        System.out.println("Gets discount: " + getsDiscount);
    }
}

Use descriptive names: isStudent, hasLicense, isPremiumMember.

Type ranges

Each type has minimum and maximum values it can hold.

Ranges.java
public class Ranges {
    public static void main(String[] args) {
        System.out.println("=== Integer Types ===");
        System.out.println("byte:  " + Byte.MIN_VALUE + " to " + Byte.MAX_VALUE);
        System.out.println("short: " + Short.MIN_VALUE + " to " + Short.MAX_VALUE);
        System.out.println("int:   " + Integer.MIN_VALUE + " to " + Integer.MAX_VALUE);
        System.out.println("long:  " + Long.MIN_VALUE + " to " + Long.MAX_VALUE);
        
        System.out.println("\n=== Floating Types ===");
        System.out.println("float max:  " + Float.MAX_VALUE);
        System.out.println("double max: " + Double.MAX_VALUE);
        
        System.out.println("\n=== Character ===");
        System.out.println("char: 0 to " + (int)Character.MAX_VALUE);
    }
}

Choose the smallest type that fits your data to save memory in large programs.

Exercise: OtherIntTypes.java

Explore other integer types: byte (tiny), short (small), long (huge)