Skip to content
Sharp

Object-oriented programming · interview question

In Java, which of the following best describes the relationship between a class and an object?

Multiple choiceEasychapter-2-curatedpremiumoopclasses-and-objects
Choose one answer
Answer and explanation

Correct answer

A. A class is a blueprint from which objects are created.

Why

A class is a blueprint that defines the structure and behavior (methods) that the objects created from it will have. An object is an instance created based on this blueprint, representing a specific realization of the class.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →