Logo

Java Questions Set 191:

Quiz Mode

Predict the output of the following Java code.

1
2
3
4

Solution:

Predict the output of the following Java code that uses a ConcurrentLinkedDeque.

1
2
3
4

Solution:

Which of this class is used to read and write bytes in a file?

1
2
3
4

Solution:

Which one of the Java API does not support threads?

1
2
3
4

Solution:

Which of these are integer constants defined in the TextEvent class?

1
2
3
4

Solution:

Which of the following methods are from the Object class?

1
2
3
4

Solution:

Which of the following statements about Java applets is correct?

1
2
3
4

Solution:

 

public class test

{

          public static void main(String[] args)

         {

               int[][][] x={{{10,20,30},{40,50,60}},{{70,80},{90,100,110}}};

               System.out.println(x[1][2][0]);

         }

}

1
2
3
4

Solution:

class GFG {

public static void main (String[] args) {

  boolean a=!true;

  boolean b=!a;

  boolean c=!!a&!b;

  boolean d=!(!c^!!b);

  System.out.println(c+" "+!d);

}

}

1
2
3
4
5
6
7
8

Solution:

What happens if the constructor of a class A is made private?

1
2
3
4

Solution: