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

71. Mobile 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: D

72. Identity characteristic of an object represents

A. the data of an object

B. the behaviors or actions of an object

C. the internal unique identity of an object

D. All of above

Answer: C

73. What is the default size of short ?

A. 1 byte

B. 2 bytes

C. 4 bytes

D. 8 bytes

Answer: B

74. A variable declared outside of a method with prefix static keyword is known as

A. Instance Variable

B. Class Variable

C. Local Variable

Answer: B

75. Which are the assignment operators ?

A. = += -= *= /= %=

B. &= ^= |=

C. <<= >>= >>>=

D. All of Above

Answer: D

76. 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: B

77. Do we follow camel-case syntax for naming the class, interface, method, and variable?

A. Yes

B. No

Answer: A

78. What is the right output of this program ?

A. 6765

B. 5654

C. 5775

D. 5765

Answer: C

79. What is the default size of byte ?

A. 1 bit

B. 1 byte

C. 2 bytes

D. 4 bytes

Answer: B

80. If you do not follow the naming conventions then you will fail to recognize Java identifiers

A. true

B. false

Answer: A