What will be the output of the following Java program? [code] class Output { public static void main(String args[])

What will be the output of the following Java program?
Code:
    class Output
    {
        public static void main(String args[])
        {
            Double i = new Double(257.5);  
            Double x = i.MIN_VALUE;
            System.out.print(x);
        }
    }
A. 0
B. 4.9E-324
C. 1.7976931348623157E308
D. None of the mentioned
 
Answer: b
Explanation: The super class of Byte class defines a constant MIN_VALUE below which a number is considered to be negative infinity. MIN_VALUE is 4.9E-324.
Output:
Code:
$ javac Output.java
$ java Output
 

Tìm kiếm

Back
Top