Java MCQs - All MCQs
History, JVM, JRE and JDK, Variables, Data Types, Operators, Control Statements, Iterative Statements, Object Class, Naming conventions, Constructors
51. What is the right output of this program ?
A. 6765
B. 5654
C. 5775
D. 5765
View Answer
52. Where to declare instance 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
53. new keyword is used for?
A. allocating memory at runtime
B. allocating memory at compile time
C. releasing memory at runtime
D. All of above
View Answer
54. Which are the unary operators ?
A. ++
B. --
C. Both of above
View Answer
55. What is an object in Java?
A. static reference
B. template or blueprint
C. instance of class
D. None of above
View Answer
56. What is empty loop in Java?
A. It has empty initialization clause
B. It has empty conditional clause
C. It has empty increment clause
D. All of above
View Answer
57. What is the default size of float ?
A. 1 byte
B. 2 bytes
C. 4 bytes
D. 8 bytes
View Answer
58. What is the correct output of this program ?
A. Compile time Error
B. A equals to B
C. A is not equals to B
View Answer
59. Enterprise 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
60. Which are the Shift operators ?
A. >>>
B. >>
C. <<
D. All of Above
View Answer
