JAVA QUIZ
1 .
What will be the output of the following Java program?
 
    class Output
    {
        public static void main(String args[])
        {
            int a = Character.MIN_VALUE;
            System.out.print((char)a);
        }
    }

Correct Answer : Option (D)

Space
  Show Answer
2 .
What will be the output of the following Java program?
 
    class Output
    {
        public static void main(String args[])
        {
	    char a = (char) 98;
            a = Character.toUpperCase(a);
            System.out.print(a);
        }
    }

Correct Answer : Option (B)

B
  Show Answer
3 .
Which of these methods of Boolean wrapper returns boolean equivalent of an object.

Correct Answer : Option (B)

booleanValue()
  Show Answer
4 .
Which of these methods return string equivalent of Boolean object?

Correct Answer : Option (A)

toString()
  Show Answer
5 .
What will be the output of the following Java program?
 
    class Output
    {
        public static void main(String args[])
        {
            String str = "true false true";
            boolean x = Boolean.valueOf(str);
            System.out.print(x);
        }
    }

Correct Answer : Option (B)

False
  Show Answer
6 .
Which of these method returns the remainder of dividend / divisor?

Correct Answer : Option (D)

IEEEremainder()
  Show Answer
7 .
Which of these method returns a smallest whole number greater than or equal to variable X?

Correct Answer : Option (A)

double ciel(double X)
  Show Answer
8 .
What will be the output of the following Java program?
 
    class Output 
    {
        public static void main(String args[]) 
        {
            double x = 3.14;  
            int y = (int) Math.toDegrees(x);
            System.out.print(y);
        }
    }

Correct Answer : Option (B)

179
  Show Answer
9 .
What will be the output of the following Java program?
 
    class Output 
    {
        public static void main(String args[]) 
        {
            double x = 102;
            double y = 5;
            double z = Math.IEEEremainder(x, y);
            System.out.print(z);}
         }
    }

Correct Answer : Option (C)

2
  Show Answer
10 .
Which of the following exceptions is thrown by every method of Runtime class?

Correct Answer : Option (D)

SecurityException
  Show Answer