Skip to content
Sharp

Object-oriented programming · interview question

Which Java keyword would you use to create a new instance of a class in Java?

Multiple choiceEasychapter-2-curatedpremiumoopobject-interaction
Choose one answer
Answer and explanation

Correct answer

C. New

Why

The new keyword is used to create a new instance of a class, allocating memory and returning a reference to the object.

Test yourself on Object-oriented programming

A free test with instant, explained results. No account needed.

Start free test
All Object-oriented programming questions →