adplus-dvertising
frame-decoration

Question

What is the output of this program?
    class isinfinite_output 
    {
        public static void main(String args[]) 
        {
            Double d = new Double(1 / 0.);  
            boolean x = d.isInfinite();
            System.out.print(x);
        }
    }

a.

0

b.

1

c.

true

d.

false

Answer: (c).true

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?

Similar Questions

Discover Related MCQs

Q. Which of these is a wrapper for data type int?

Q. Which of the following methods is a method of wrapper Integer for obtaining hash code for the invoking object?

Q. Which of these is a super class of wrappers Long, Character & Integer?

Q. Which of these is a wrapper for simple data type char?

Q. Which of the following is method of wrapper Integer for converting the value of an object into int?

Q. Which of these methods is used to obtain value of invoking object as a long?

Q. Which of these class have only one field ‘TYPE’?

Q. Which of the following method of Process class can terminate a process?

Q. Standard output variable ‘out’ is defined in which class?

Q. Which of these class can encapsulate an entire executing program?

Q. Which of the following is method of System class is used to find how long a program takes to execute?

Q. Which of these class holds a collection of static methods and variables?

Q. Which of these class is a superclass of all other classes?

Q. Which of these method of Object class can generate duplicate copy of the object on which it is called?

Q. What is the value of double consonant ‘E’ defined in Math class?

Q. Which of these method is a rounding function of Math class?

Q. Which of these class contains only floating point functions?

Q. Which of these class encapsulate the runtime state of an object or an interface?

Q. What is the value of “d” after this line of code has been executed?

double d = Math.round ( 2.5 + Math.random() );

Q. Which of these exceptions is thrown by methods of System class?