Printing minimum values for different data types

Report a typo

Your task is to complete a partially written program that prints the minimum possible values for six different data types in Java. You should fill the blanks in the code with suitable data type declarations.

Fill in the gaps with the relevant elements
public class Main {
    public static void main(String[] args) {
         smallestByte = Byte.MIN_VALUE;
         smallestShort = Short.MIN_VALUE;
         smallestInt = Integer.MIN_VALUE;
         smallestLong = Long.MIN_VALUE;
        float smallestFloat = Float.MIN_VALUE;
        double smallestDouble = Double.MIN_VALUE;
        System.out.println("Minimum byte value: " + smallestByte);
        System.out.println("Minimum short value: " + smallestShort);
        System.out.println("Minimum integer value: " + smallestInt);
        System.out.println("Minimum long value: " + smallestLong);
        System.out.println("Minimum float value: " + smallestFloat);
        System.out.println("Minimum double value: " + smallestDouble);
    }
}
shortlongbyteint
___

Create a free account to access the full topic