Logo

Java Questions Set 115:

Quiz Mode

TransferQueue is not a subinterface of Queue

1
2

Solution:

  Interpreter convert bytecode to machine language code 

1
2

Solution:

Which of these methods waits for the thread to terminate?

1
2
3
4

Solution:

Which of these methods is used to implement the Runnable interface?

1
2
3
4

Solution:

If you pass an  array to the method  then the method receives

1
2
3
4

Solution:

What is the correct output?

public class Abekus {

 int x = 5;

 public static void main(String[] args) {

  Abekus a = new Abekus();

  System.out.println(a.x);

 }

}

Solution:

 

public class j{

public static void main(String args[]){

String s1=new String("java");

String s2=new String("JAVA");

System.out.println(s1.equals(s2));

}

}


1
2
3
4

Solution:

Which is the correct option?

 class Abekus {

 final public void show() {

 System.out.println("Abekus::show() called");

 }

}

class Derived extends Abekus {

 public void show() {

 System.out.println("Derived::show() called");

 }

}

public class Main {

 public static void main(String[] args) {

  Abekus a = new Abekus();;

  a.show();

 }

}

1
2
3
4

Solution:

 class show 

    {

        public static void main(String args[]) 

        {

           try 

           {

               int a = 6;

               int b = 7;

               int c = b / a;

               System.out.print("Abekus");

           }

           catch(Exception e) 

           {

               System.out.print("Slack");

           } 

        }

    }

1
2
3
4
5

Solution: