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
View Answer
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
View Answer
143. What is the default size of byte ?
A. 1 bit
B. 1 byte
C. 2 bytes
D. 4 bytes
View Answer
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
View Answer
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
View Answer
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
View Answer
147. Having compiled source code, It converts to another code called?
A. Byte code
B. Executable code
C. Binary code
View Answer
148. What is the right output of this program ?
A. true
B. false
View Answer
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
View Answer
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
View Answer
