Home
MCQs
Java MCQs
All MCQs
Java MCQs

Java MCQs - All MCQs

History, JVM, JRE and JDK, Variables, Data Types, Operators, Control Statements, Iterative Statements, Object Class, Naming conventions, Constructors

131. Can we overload constructors in java?

A. Yes

B. No

Answer: A

132. Which is the right naming convention for package in Java?

A. package com.sindhi.tutorials;

B. package comSindhiTutorials;

C. package ComSindhiTutorials;

D. All of above

Answer: A

133. A program which shows an example of

A. initialization by reference variable

B. initialization by method

C. initialization by constructor

D. None of above

Answer: A

134. What is the correct output of this program ?

A. A less than B

B. A greater than B

C. Compile time error

Answer: A

135. Java ME stands for ?

A. Java Enterprise Edition

B. Java Standard Edition

C. Java Micro Edition

D. None of Above

Answer: C

136. What is the default size of double ?

A. 1 byte

B. 2 bytes

C. 4 bytes

D. 8 bytes

Answer: D

137. Having compiled source code, It converts to another code called?

A. Byte code

B. Executable code

C. Binary code

Answer: A

138. Which is the right naming convention for Variable in Java?

A. double GrossSalary;

B. double grossSalary;

C. double gross_salary;

D. All of above

Answer: B

139. What is the functionality of break statement?

A. To terminate current iteration

B. To continue current iteration

C. To terminate main flow

D. To continue main flow

Answer: A

140. Which is the valid variable name ?

A. 5thTeam

B. &5thteam

C. _5thTeam

D. None of Above

Answer: C