Java MCQs - All MCQs
History, JVM, JRE and JDK, Variables, Data Types, Operators, Control Statements, Iterative Statements, Object Class, Naming conventions, Constructors
1. A variable declared inside the method is known as
A. Instance Variable
B. Class Variable
C. Local Variable
View Answer
2. Java naming convention is a suggestion only to follow
A. true
B. false
View Answer
3. What is the right output of this program ?
A. true
B. false
View Answer
4. What the naming convention should be for Interfaces in Java?
A. It should start with the uppercase letter.
B. It should be an adjective such as Intelligent, Acceptable
C. Use appropriate words, instead of acronyms.
D. All of above
View Answer
5. Which kind of Java programming is?
A. Procedural
B. Non-Procedural
C. Object Oriented
D. Event Driven
View Answer
6. State characteristic of an object represents
A. the data of an object
B. the behaviors or actions of an object
C. the internal unique identity of an object
D. All of above
View Answer
7. Which are the assignment operators ?
A. = += -= *= /= %=
B. &= ^= |=
C. <<= >>= >>>=
D. All of Above
View Answer
8. JDK stands for ?
A. Java Development Kit
B. Java Virtual Machine
C. Java Run-time Environment
D. None of Above
View Answer
9. What is the correct output of this program ?
A. 1 2 3 4 5 6 7 8 9 10
B. 0 1 2 3 4 5 6 7 8 9 10
C. 1 2 3 4 5 6 7 8 9 10 11
D. None of above
View Answer
10. What is the correct output of this program ?
A. 2 4 6 8 10
B. Compile time error
C. Infinite Loop
D. None
View Answer
