Top 10 Interview Questions on Object Oriented Programming

Top 10 Interview Questions on Object Oriented Programming

1. What is an Object in OOPS?

An object is a software bundle of variables and related methods. Objects are related to real life scenario. Class is the general thing and object is the specialization of general thingObjects is instance of classes.

Declaration of an Object in OOPs

ClassName objectName=new ClassName();

E.g.: Person objPerson= new Person();

An object is characterized by concepts like:

Attribute

Behavior

Identity

2. What is an Attribute in OOPs?

Attributes define the characteristics of a class.

The set of values of an attribute of a particul