Java MCQs - All MCQs
History, JVM, JRE and JDK, Variables, Data Types, Operators, Control Statements, Iterative Statements, Object Class, Naming conventions, Constructors
101. What is a Java development kit (JDK) ?
A. It is a set of libraries with a Java runtime environment.
B. It is a just development tool.
C. It is a development tool with a Java runtime environment.
D. It is a just runtime environment.
View Answer
102. A variable declared inside the method is known as
A. Instance Variable
B. Class Variable
C. Local Variable
View Answer
103. What is the correct output of this program ?
A. A greater than B
B. A less than B
C. A greater than B OR A less than B
D. Invalid Condition
View Answer
104. Where to declare class variables ?
A. It declares inside the class and outside of method.
B. It declares inside the class with static prefix and outside of method.
C. It declares inside the method.
View Answer
105. What is the correct output of this program ?
A. 1 2 3 4 5 6 7 8 9 10
B. None
C. 1 3 5 7 9
D. Infinite Loop
View Answer
106. Constructor name and class name can be different in java?
A. Yes
B. No
View Answer
107. A name of variable is known as
A. Data Type
B. Constant
C. Identifier
View Answer
108. Which are the logical operators ?
A. &&
B. ||
C. All of above
D. None of Above
View Answer
109. What is the correct output of this program ?
A. Compile time Error
B. Run time Error
C. If condition true
View Answer
110. Who is the founder of Java?
A. Dennis Ritchie
B. James Gosling
C. Rasmus Lerdorf
D. Brendan Eich
View Answer
