public class Main {
public static void main(String[] args) {
System.out.println("\nPrimitive Integer Types");
System.out.printf("The range of an byte is: " + Byte.MIN_VALUE + " to " + Byte.MAX_VALUE);
System.out.println (" and the byte Size is " +Byte.SIZE + " bits");
System.out.print("The range of an Short is: " + Short.MIN_VALUE + " to " +Short.MAX_VALUE);
System.out.println(" and the short Size is " + Short.SIZE + " bits");
System.out.printf("The range of an int is: " + Integer.MIN_VALUE + " to " + Integer.MAX_VALUE);
System.out.println(" and the int Size is " + Integer.SIZE + " bits");
System.out.printf("The range of an long is: " + Long.MIN_VALUE + " to " + Long.MAX_VALUE);
System.out.println(" and the long size is " + Long.SIZE + " bits");
//What happens when you add 1 to the MaxValue
//Overflow
System.out.println("\nMaxIntMaxValue + 1 = " +( Integer.MAX_VALUE + 1 )
+ " rolls around to the Min Value called Overflow"
+ " or wrap around" ) ;
//What happens when you subtract 1 to the MinValue
// Underflow
System.out.println("MaxIntMaxValue + 1 = " +( Integer.MIN_VALUE - 1 )
+ " rolls around to the Max Value called Underflow"
+ " or wrap around" ) ;
System.out.println("\nPrimitive Floating-point Types");
System.out.printf("The range of an double is: " + Double.MIN_VALUE + " to " + Double.MAX_VALUE);
System.out.println(" and the double size is " + Double.SIZE + " bits");
System.out.printf("The range of an Float is: " + Float.MIN_VALUE + " to " + Float.MAX_VALUE );
System.out.println(" and the float size is " + Float.SIZE + " bits");
System.out.printf("\nCharacter size range is " + (Character.MIN_VALUE + 0) + " to " + (Character.MAX_VALUE + 0));
System.out.println(" and character size is " + Character.SIZE + " bits");
boolean TrueVal = true;
boolean FalseVal = false;
System.out.println("Boolean values are " + TrueVal + " or " + FalseVal);
System.out.println("Is 10 < 9: T/F: " + (10 < 9));
System.out.println("Is 10 > 9: T/F: " + (10 > 9));
System.out.println("Is 10 = 10: T/F: " + (10 == 10));
}
}