Java MCQs - All MCQs
History, JVM, JRE and JDK, Variables, Data Types, Operators, Control Statements, Iterative Statements, Object Class, Naming conventions, Constructors
81. What is the correct output of this program ?
A. A2 A2 A3 Default
B. A2
C. A2 A3 Default
D. Default
View Answer
82. Which are the logical operators ?
A. &&
B. ||
C. All of above
D. None of Above
View Answer
83. 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
84. What is the correct output of this program ?
A. Run time Error
B. Compile time error
C. Hello Loop
D. Infinite Loop
View Answer
85. What is the correct output of this program ?
A. A greater than B
B. A less equals to B
C. Else condition
View Answer
86. What will be the output of following program?
A. 0123456789
B. 02468
C. 0246810
D. 123456789
View Answer
87. What is the default size of long ?
A. 1 byte
B. 2 bytes
C. 4 bytes
D. 8 bytes
View Answer
88. What is nested loop?
A. A Loop with empty initialization
B. A Loop within a Loop
C. A Loop without condition
D. All of above
View Answer
89. What is the default value of short ?
A. 0 default value
B. 0s default value
C. 0.0 default value
D. 0.0f default value
View Answer
90. What is the default value of byte ?
A. 0 default value
B. 0b default value
C. 0.0 default value
D. 0.0f default value
View Answer
