Java concepts and its programming – MCQs

80 questions. Click to practice.

Correct options are highlighted when revealed.

1.What type of programming construct is Runnable?

2.When is an object instantiated using the "new" keyword?

3.Which Java method does the JVM call to clean up memory that is no longer reachable?

4.Which type of file does the JVM generate after compiling Java source code?

5.Which collection class maps keys to values and maintains the keys in their natural sorted order?

6.Which keyword is used to declare a variable that belongs to the class itself instead of to any individual object?

7.Which JDBC driver is considered the most efficient and is generally recommended for use in JDBC applications?

8.What is the data type of the parameter in the main method?

9.Which command is used to disassemble a Java class file?

10.What is the primary function of the javap tool in Java?

11.Which of the following is a built-in package in Java?

12.Which of the following type conversions occurs automatically without explicit casting?

13.What do you call an object designed to hold a set of other objects?

14.Which type of cloning involves creating a copy of an object along with all the objects it contains?

15.What is the primary function of jdb in Java?

16.What is the term used for the intermediate code generated by Java?

17.What does inheritance signify in object-oriented programming?

18.In the JDBC API, which method is both static and synchronized?

19.In Java, which type of class is not allowed to be extended by any other class?

20.Which of the following best describes the typing discipline of the Java programming language?