Google News
logo
Java - Quiz(MCQ)
1 .
Choose the appropriate data type for this value: "1"  
A)
Int
B)
Char 
C)
Boolean 
D)
String

Correct Answer : Option (D) :  

String

2 .
What does GUI stand for?
A)
Graphical User Interface
B)
Grand User Interface
C)
Graphical Useful Interface
D)
Gaming User Interface

Correct Answer : Option (A) :  

Graphical User Interface 

3 .
What does AWT stands for ?
A)
Adjust Window Toolkit
B)
Abstract window Toolkit
C)
Advanced Window Toolkit
D)
None of the choices

Correct Answer : Option (B) :   Abstract window Toolkit

4 .
Which of the following is the highest class in the event-delegation model ?
A)
java.awt.AWTEvent
B)
java.util.EventListener
C)
java.util.EventObject 
D)
None of the above

Correct Answer : Option (C) :  

java.util.EventObject 

5 .
Which declaration of the main method below would allow a class to be started as a standalone program.
A)
public static int main(char args[])
B)
public static void main(String args[]) 
C)
public static void main(String args)
D)
public static void MAIN(String args[])

Correct Answer : Option (B) :  

public static void main(String args[])

6 .
Method,Field can be accessed from the same class to which they belong.
A)
Public
B)
Private 
C)
Protected
D)
Default

Correct Answer : Option (B) :  

Private 

7 .
An object could be ...
A)
An algorithm
B)
A program
C)
A data container
D)
Anything

Correct Answer : Option (D) :  

Anything

8 .
What is the meaning of the return data type void?
A)
An empty memory space is returned so that the developers can utilize it.
B)
void is not supported in Java .
C)
void returns no data type.
D)
None of the above

Correct Answer : Option (C) :  

void returns no data type. 

9 .
What are/is the part/parts in executing a Java program ?
A)
Java Compiler
B)
Java Interpreter
C)
Both of the above 
D)
None of the above

Correct Answer : Option (C) :  

Both of the above

10 .
Which of these are legal identifiers.
A)
number_1
B)
number_a
C)
$1234
D)
All of the above.

Correct Answer : Option (D) :  

All of the above.