OOPs Programming Technology 

encapsulation in java with realtime example Watch Video

Encapsulation in Java – Encapsulation is one of the fundamental Object Oriented Programming (OOP) concepts. The other fundamentals are inheritance, polymorphism, and abstraction. Encapsulation in Java is a mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit. Why Is Encapsulation? It’s because encapsulation has a number of benefit that make the easy reusability, flexibility and maintainability of the code. Flexibility: It’s more flexible and easy to change and maintable the encapsulated code with new requirements. For example, if the requirement for setting the age of a…

Read More