1.

If different properties and functions of a real world entity is grouped or embedded into a single element, what is it called in OOP language?(a) Inheritance(b) Polymorphism(c) Abstraction(d) EncapsulationThis question was posed to me during an online interview.My doubt is from OOPs Features in portion OOPs Concept & Features of Object Oriented Programming

Answer» RIGHT choice is (d) Encapsulation

Explanation: It is Encapsulation, which groups different properties and functions of a REAL WORLD entity into single ELEMENT. Abstraction, on other hand, is hiding of functional or exact WORKING of codes and showing only the things which are required by the user.


Discussion

No Comment Found

Related InterviewSolutions