1.

Which among the following is the main characteristic of class?(a) Inheritance(b) Encapsulation(c) Polymorphism(d) Object creationThe question was posed to me in a national level competition.My question is taken from Class Use topic in chapter Classes of Object Oriented Programming

Answer»

Correct choice is (b) Encapsulation

For explanation: The classes are MADE to encapsulate the DATA and properties that are most similar and can be grouped TOGETHER inside a SINGLE class. This single class can represent all of those features by creating its instances.



Discussion

No Comment Found

Related InterviewSolutions