Logo

Java Questions Set 71:

Quiz Mode

JVM programmer can create an exception or not

1
2

Solution:

Predict the output of the following Java program:

1
2
3
4

Solution:

Which of these class is used to read characters in a file?


1
2
3
4

Solution:

On applying the left shift operator, <<, on an integer, which bit position are bits lost when they are shifted past?

1
2
3
4

Solution:

Is the following statement True or False?: "Servlet classes can declare a constructor with a ServletConfig object as an argument."

1
2

Solution:

Which of these is a method of the ObjectOutput interface used to finalize the output state and clear any buffers?

1
2
3
4

Solution:

 

Which one creates an instance of an array?

1
2
3
4

Solution:

public class output{

public static void main(String args[]){

int a=100;

int b=120;

int result=0;

result= (a + ++b)+1;

System.out.println(result);

 }

}

1
2
3
4

Solution:

Statement1: The process of wrapping or putting up of data in to a single unit class.
Statement2: Keeps data safe from  misuse.

The above are the feautures of which OOP concept?

1
2
3
4

Solution:

Statement 1- class encapsulate runtime environment 

Statement 2- Runtime encapsulate runtime environment 

Statement 3- Classloader encapsulate runtime environment 

1
2
3
4

Solution: