Logo

Java Questions Set 257:

Quiz Mode

Iterable is  an Interface

1
2

Solution:

While creating SessionFactory in hibernate, which design pattern should be adopted?

1
2

Solution:

Which method is used to get the type of content in the URL?

1
2
3
4

Solution:

Predict the output of the following Java code.

1
2
3
4

Solution:


What happens if write something into the file using FileWriter and after that file will not close?

1
2
3

Solution:

Which method must be defined by a class implementing the java.lang.Runnable interface?

1
2
3
4

Solution:

public class Main

{  

public static void main(String[] args) {

float a = 010.0f;

String temp = Float.toString(a);

System.out.println(temp);

}

}

1
2
3
4

Solution:

Predict the output of the following Java code.

1
2
3
4

Solution:

What happens if we provide the implementation of a method in an interface?

1
2
3
4

Solution: