Fundamental (primitive) data types in Java:

  1. Java fundamental types:

  2. Java provides help/auxiliary methods to support programming using values from its fundamental types.

    These help methods are stored (organized) in classes (called wrapper classes).


    Java does not allow "free-standing" methods

    Recall that the second use of a class is to contain/hold static constants, variable or methods: click here


  3. Java's wrapper classes:


    *** All classes inside the java.lang are automatically imported into your Java program
    (That's why you can use System.out.println without import - it's in java.lang: click here)

  4. The wrapper classes contain:


    Example of using wrapper classes:

    Program to print the minimum and maximum values of Java's primitive types: click here DEMO


  5. Overflow: beware of the fact that operations can result in values that exceed the capacity of a data type