Why is encapsulation needed in Java?

Why Do We Need Encapsulation Encapsulation allows us to modify the code or A part of the code without having to change any other functions or code . Encapsulation controls how we access data. We can modify the code based on the requirements using encapsulation.

Sizin İçin Seçtik  What is polymorphism in C++ with example?

Leave a Reply

Your email address will not be published. Required fields are marked *