JAVA QUIZ
1 .
Which one is a valid declaration of a boolean?

Correct Answer : Option (C)

boolean b3 = false;
  Show Answer
2 .
What class must an inner class extend ?

Correct Answer : Option (A)

Any class or interface
  Show Answer
3 .
Every class in Java is a sub-class of what?

Correct Answer : Option (C)

Object Class
  Show Answer
4 .
With inheritance, a derived subclass object can directly access any

Correct Answer : Option (B)

Public superclass member (and protected subclass members if it's in the same package) 
  Show Answer
5 .
What's the difference between an Applet and an application ?

Correct Answer : Option (A)

Applets are run over the web. 
  Show Answer
6 .
What is the role of the constructor? 

Correct Answer : Option (B)

Create an instance of a class (an object) 
  Show Answer
7 .
The size of a frame is set using ...

Correct Answer : Option (C)

The method setSize() 
  Show Answer
8 .
Base class for all exceptions

Correct Answer : Option (D)

Java.Lang.throwable
  Show Answer
9 .
Environment variable that stores the location of bin folder

Correct Answer : Option (B)

PATH 
  Show Answer
10 .
What will be printed?
double value = 2 / 3;
System.out.println(value);

Correct Answer : Option (A)

0.0
  Show Answer