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

21. When the Java language project initiated?

A. June 1991

B. April 1995

C. Jan 1996

D. Feb 1997

Answer: A

22. Which is the right naming convention for Constants in Java?

A. static final int day_package

B. static final int DAY_PACKAGE

C. static final int dayPackage

D. All of above

Answer: B

23. What is a Java development kit (JDK) ?

A. It is a set of libraries with a Java runtime environment.

B. It is a just development tool.

C. It is a development tool with a Java runtime environment.

D. It is a just runtime environment.

Answer: C

24. What is the correct output of this program ?

A. Basic Subjects

B. Java Subjects

C. Microsoft Subjects

D. Default

Answer: B

25. Which are the logical operators ?

A. &&

B. ||

C. All of above

D. None of Above

Answer: C

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

A. Byte code

B. Executable code

C. Binary code

Answer: A

27. Which are the unary operators ?

A. ++

B. --

C. Both of above

Answer: C

28. What the naming convention should be for Variables in Java?

A. It should start with a lowercase letter such as id, name

B. It should not start with the special characters, And Avoid using one-character variables such as x, y, z.

C. If name have multiple names then start it with the lowercase letter followed by an uppercase letter such as firstName, lastName.

D. All of Above

Answer: D

29. What is the return value of constructor in java?

A. 1

B. null

C. void

D. instance

Answer: D

30. How many characteristics Object has?

A. 2

B. 3

C. 5

D. 1

Answer: B