1.

Which of the two features match each other?(a) Inheritance and Encapsulation(b) Encapsulation and Polymorphism(c) Encapsulation and Abstraction(d) Abstraction and PolymorphismI have been asked this question in an interview for internship.This intriguing question originated from OOPs Basic Concepts topic in section OOPs Concept & Features of Object Oriented Programming

Answer»

The CORRECT choice is (c) Encapsulation and Abstraction

Easy explanation - Encapsulation and Abstraction are similar features. Encapsulation is ACTUALLY binding all the properties in a single class or we can say hiding all the features of object inside a class. And Abstraction is hiding unwanted data (for user) and SHOWING only the data REQUIRED by the user of PROGRAM.



Discussion

No Comment Found

Related InterviewSolutions