package other;

public class SizesDemo {
    public static void main(String[] args) {

        // Integer
        System.out.println(Integer.TYPE + " size: " + Integer.SIZE + " bits");
        System.out.println("Numbers: " + Math.pow(2, Integer.SIZE));
        System.out.println("Range: -" + Integer.MIN_VALUE + " to "
                + Integer.MAX_VALUE);

        System.out.println("------------------------------------");

        // Float
        System.out.println(Float.TYPE + " size: " + Float.SIZE + " bits");
        System.out.println("Numbers: " + Math.pow(2, Float.SIZE));
        System.out.println("Range: -" + Float.MIN_VALUE + " to "
                + Float.MAX_VALUE);

        System.out.println("------------------------------------");

        // Double
        System.out.println(Double.TYPE + " size: " + Double.SIZE + " bits");
        System.out.println("Numbers: " + Math.pow(2, Double.SIZE));
        System.out.println("Range: -" + Double.MIN_VALUE + " to "
                + Double.MAX_VALUE);
        
    }
}
