Type Here to Get Search Results !

In OOP, what is an "object"?

0

 In OOP, what is an "object"?

A) A blueprint for creating classes.
B) A variable that holds a reference to a method.
C) An instance of a class that encapsulates state and behavior.
D) A type of design pattern.

Answer: C) An instance of a class that encapsulates state and behavior.

Explanation: An object is an instance of a class that encapsulates both state (attributes) and behavior (methods). Objects are the fundamental building blocks of OOP, representing real-world entities or concepts in a structured way.

Post a Comment

0 Comments