Logo

Java Questions Set 118:

Quiz Mode

_________() method is used to convert the string to upper case.

Solution:

Double value() method  returns the value  as double 

1
2

Solution:

The abstract map is a 

1
2
3
4

Solution:

Which keyword is used to manually handle exceptions?

1
2
3
4

Solution:

Which method is used to implement the Runnable interface?

1
2
3
4

Solution:

Which of the following Java interfaces has no fields or methods?

1
2
3
4

Solution:

Which interface contains all the methods used for handling thread operations in Java?

1
2
3
4

Solution:

public class Demo123{

     public static void main(String args[]){

String s1= new String("Abekus");

System.out.println(s1.replace("a","k"));

   }

}

1
2
3
4

Solution:

Which two of the following are legal declarations for nonnested classes and interfaces?

  1. final abstract class Test {}
  2. public static interface Test {}
  3. final public class Test {}
  4. protected abstract class Test {}
  5. protected interface Test {}
  6. abstract public class Test {}

1
2
3
4

Solution:

Predict the output of the following Java code:

1
2
3
4

Solution: