459). Which of these methods can be used to check whether the given value is a number or not?

[A]isNaN()
[B]isNumber()
[C]checkNaN()
[D]checkNumber()

Show Answer

460). Which of these method of Double wrapper can be used to check whether a given value is infinite or not?

[A]Infinite()
[B]isInfinite()
[C]checkInfinite()
[D]None of the mentioned

Show Answer

461). Which of these exceptions is thrown by compareTo() method defined in a double wrapper?

[A]IOException
[B]SystemException
[C]CastException
[D] ClassCastException

Show Answer

462). What will be the output of the following Java code?
   class Output 
    {
        public static void main(String args[])
        {
            Double i = new Double(257.5);  
            boolean x = i.isNaN();
            System.out.print(x);
        }
    }

[A]true
[B]false
[C]0
[D]1

Show Answer

463). What will be the output of the following Java code?
    class Output
    {
        public static void main(String args[])
        {
            Double i = new Double(257.578);  
            int x = i.intValue();
            System.out.print(x);
        }
    }

[A]0
[B]1
[C]256
[D]257

Show Answer

464). What will be the output of the following Java code?
    class Output
    {
        public static void main(String args[])
        {
	    Double i = new Double(257.578123456789);  
            float x = i.floatValue();
            System.out.print(x);
        }
    }

[A]0
[B]257.0
[C]257.57812
[D]257.578123456789

Show Answer

465). What will be the output of the following Java code?
    class Output
    {
        public static void main(String args[])
        {
            Double y = new Double(257.57812);
	    Double i = new Double(257.578123456789);  
            try
            {
	        int x = i.compareTo(y);
                System.out.print(x);
            }
            catch(ClassCastException e)
            {
                System.out.print("Exception");
            }
	}
    }

[A]0
[B]1
[C]Exception
[D] None of the mentioned

Show Answer