Question: Why is encapsulation called Data Hiding? What are the main benefits of using encapsulation in Java? Provide an example of how to achieve encapsulation in
- Why is encapsulation called Data Hiding?
- What are the main benefits of using encapsulation in Java?
- Provide an example of how to achieve encapsulation in Java.
- Is it possible to declare abstract methods as private? Justify your answer.
- Is it compulsory for a class, which has been declared as abstract, to have at least one abstract method?
Step by Step Solution
There are 3 Steps involved in it
Data Hiding in Encapsulation Encapsulation in objectoriented programming is often referred to as data hiding because it allows you to hide the interna... View full answer
Get step-by-step solutions from verified subject matter experts
