Java MCQs with answers Page - 36

Here, you will find a collection of MCQ questions on Java. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. Which of the following is a type of polymorphism in Java?

  • (A) Compile time polymorphism
  • (B) Execution time polymorphism
  • (C) Multiple polymorphism
  • (D) Multilevel polymorphism

A

Admin • 833.24K Points
Coach

Q. When does method overloading is determined?

  • (A) At run time
  • (B) At compile time
  • (C) At coding time
  • (D) At execution time

A

Admin • 833.24K Points
Coach

Q. Which concept of Java is a way of converting real world objects in terms of class?

  • (A) Polymorphism
  • (B) Encapsulation
  • (C) Abstraction
  • (D) Inheritance

A

Admin • 833.24K Points
Coach

Q. Which component is responsible to optimize bytecode to machine code?

  • (A) JVM
  • (B) JDK
  • (C) JIT
  • (D) JRE

A

Admin • 833.24K Points
Coach

Q. How can we identify whether a compilation unit is class or interface from a .class file?

  • (A) Java source file header
  • (B) Extension of compilation unit
  • (C) We cannot differentiate between class and interface
  • (D) The class or interface name should be postfixed with unit type

A

Admin • 833.24K Points
Coach

Q. Which of these packages contains abstract keyword?

  • (A) java.lang
  • (B) java.util
  • (C) java.io
  • (D) java.system

A

Admin • 833.24K Points
Coach

Q. Which of these class is used to create an object whose character sequence is mutable?

  • (A) String()
  • (B) StringBuffer()
  • (C) String() & StringBuffer()
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. Which of these method of class StringBuffer is used to find the length of current character sequence?

  • (A) length()
  • (B) Length()
  • (C) capacity()
  • (D) Capacity()

A

Admin • 833.24K Points
Coach

Q. Which of the following below live on the heap in java?

  • (A) Class
  • (B) Instance variable
  • (C) Method
  • (D) Object

A

Admin • 833.24K Points
Coach

Q. Which of the following interface is used to declare core methods in java?

  • (A) Set
  • (B) EventListner
  • (C) Collection
  • (D) Comparator

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ