Computer Science, asked by AJ0812, 1 year ago

define encapsulation with an example

Answers

Answered by Utkarsh001
13
In Object Oriented Programming,Encapsulation is defined as binding together the data and the functions that manipulates them. Consider a real life example of encapsulation, in a company there are different sections like the accounts section, finance section, sales section etc.
Encapsulation. Encapsulation is one of the four fundamental OOP concepts. The other three 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.
Similar questions