Write a program in JAVA that prints the bounds ( maximum and minimum values) for all integer data types in Java.
public class Ranges { public static void main(String[] args) { System.out.println("Range of byte: " + Byte.MIN_VALUE + " to " + Byte.MAX_VALUE); System.out.println("Range of short: " + Short.MIN_VALUE + " to " + Short.MAX_VALUE); System.out.println("Range of int: " + Integer.MIN_VALUE + " to " + Integer.MAX_VALUE); System.out.println("Range of long: " + Long.MIN_VALUE + " to " + Long.MAX_VALUE); } }
Get Answers For Free
Most questions answered within 1 hours.