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

141. 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

Answer: A

142. Which is the right naming convention for method in Java?

A. void DrawShape()

B. void draw_shape()

C. void drawShape()

D. All of above

Answer: C

143. What is the default size of byte ?

A. 1 bit

B. 1 byte

C. 2 bytes

D. 4 bytes

Answer: B

144. Standalone Applications are known as

A. Distributed applications

B. Server side applications or Web applications

C. Desktop applications or Window-based applications

D. Android applications or Java ME applications

Answer: C

145. What are the different ways to create an object in Java?

A. by new keyword

B. by newInstance() or clone() method

C. by deserialization & factory method

D. All of Above

Answer: D

146. What is Java?

A. A physical machine

B. A software tool

C. A programming language and a platform

D. A tool which creates another software

Answer: C

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

A. Byte code

B. Executable code

C. Binary code

Answer: A

148. What is the right output of this program ?

A. true

B. false

Answer: A

149. Web Applications are known as

A. Distributed applications

B. Server side applications or Web applications

C. Desktop applications or Window-based applications

D. Android applications or Java ME applications

Answer: B

150. What is a naming convention in Java?

A. A rule for writing names of methods only

B. A rule for writing names of classes only

C. A rule for writing names of identifiers

Answer: C