| | | | Question Answer Tutorial - JAVA->Core JAVA | | | | Question: test1 | | Answer: test2
| | | | | | | | Question: What are the principle concepts of OOPS? | | Answer: There are four principle concepts upon which object oriented design and programming rest. They are:
/>Abstraction Polymorphism Inheritance />Encapsulation (i.e. easily remembered as A-PIE).
| | | | | | | | Question: What is Abstraction? | | Answer: Abstraction refers to the act of representing essential feat ures without including the background details or explanations. />
| | | | | | | | Question: What is Encapsulation?
| | Answer: Encapsulation is a technique used for hiding the properties& nbsp;and behaviors of an object and allowing />outside access only as appropriate. It prevents other obje cts from directly altering or accessing />the properties or methods of the encapsulated object.
/>
| | | | | | | | Question: What is the difference between abstraction and encapsulation? | | Answer: 1.) Abstraction focuses on the outside view of an objec t (i.e. the interface) Encapsulation />(information hiding) prevents clients from seeing it’s inside&n bsp;view, where the behavior of the />abstraction is implemented. />2.) Abstraction solves the problem in the design side  ;while Encapsulation is the Implementation. />Encapsulation is the deliverables of Abstraction.
/>3.) Encapsulation barely talks about grouping up your abst raction to suit the developer needs.
| | | | | | | | | | | | |