Logo

Java Questions Set 77:

Quiz Mode

 BlockingEnque  is a subinterface of Queue 

1
2

Solution:

Which of these is not a mocking framework?

1
2
3
4

Solution:

Which of the following is not a dependency management tool?

1
2
3
4

Solution:

What is required in order to run JSP

1
2
3
4

Solution:

Why is the Runnable interface used in Java?

1
2
3
4

Solution:

Which Java methods can be used to check file accessibility?

1
2
3
4

Solution:

class test{

public static void main (String[] args) {

   int x=10,y=15;

   if(x++<10 || ++y>15)

   {

       x++;

   }

   else

   {

       y--;    

   }

   System.out.println(x+" "+(++y));

}

}

1
2
3
4

Solution:

Statement 1 - public static void main(String args[])

Statement 2 - public static void main(String [] args)

Statement 3 - public static void main(String [] ar)

Statement 4 - public static void main(String ar[])

1
2
3
4

Solution:

What will be the output of the following Java code?


class Output

{

public static void main(String[] args)

{

byte a[] = { 65, 66, 67, 68, 69, 70 };

byte b[] = { 71, 72, 73, 74, 75, 76 };

System.arraycopy(a, 0, b, 0, a.length);

System.out.print(new String(a) + " " + new String(b));

}

}

1
2
3
4

Solution:

Predict the output of the following Java code:

import java.util.concurrent.CopyOnWriteArrayList;

import java.util.*;

class Abekus {

static CopyOnWriteArrayList c = new CopyOnWriteArrayList();

public static void main(String[] args) {

c.add(0,42);

c.add(0,22);

c.add(0,94);

c.add(2,07);

System.out.println(c);

}

}

1
2
3
4

Solution: