| |
2. 1. 8. Get the minimum and maximum value of a primitive data types |
|
public class Main {
public static void main(String[] args) {
System.out.println("Byte.MIN = " + Byte.MIN_VALUE);
System.out.println("Byte.MAX = " + Byte.MAX_VALUE);
System.out.println("Short.MIN = " + Short.MIN_VALUE);
System.out.println("Short.MAX = " + Short.MAX_VALUE);
System.out.println("Integer.MIN = " + Integer.MIN_VALUE);
System.out.println("Integer.MAX = " + Integer.MAX_VALUE);
System.out.println("Long.MIN = " + Long.MIN_VALUE);
System.out.println("Long.MAX = " + Long.MAX_VALUE);
System.out.println("Float.MIN = " + Float.MIN_VALUE);
System.out.println("Float.MAX = " + Float.MAX_VALUE);
System.out.println("Double.MIN = " + Double.MIN_VALUE);
System.out.println("Double.MAX = " + Double.MAX_VALUE);
}
}
|
|
|