Computer Science, asked by hurmathhurmath0, 8 months ago

write a note on encapsulation​

Answers

Answered by mishka93
2

Explanation:

here's your answer

  • Encapsulation is the technique of binding or keeping together the data and the functions (that operate on them) in a single unit called a class. Encapsulation is the way to implement data abstraction. A well-encapsulated object acts as a 'black box' for other parts of the program.

hope it's helpful for you ☺️

Answered by naysa81
2

Encapsulation in Java is a process of wrapping code and data together into a single unit, for example, a capsule which is mixed of several medicines. ... Now we can use setter and getter methods to set and get the data in it. The Java Bean class is the example of a fully encapsulated class.

Encapsulation is one of the fundamentals of OOP (object-oriented programming). It refers to the bundling of data with the methods that operate on that data. Encapsulation is used to hide the values or state of a structured data object inside a class, preventing unauthorized parties' direct access to them.

Similar questions