Skip to content
Sharp

Object-oriented programming · interview question

Which Java keyword is used to create an object of a class?

Multiple choiceMediumchapter-2-curatedpremiumoopbasic-modeling
Choose one answer
Answer and explanation

Correct answer

C. New

Why

The 'new' keyword is used in Java to create a new instance of a class. It allocates memory for the object and returns a reference to that memory.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →