Give an important example of encapsulation in java
Answers
Answered by
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.
Similar questions
English,
6 months ago
Science,
6 months ago
English,
1 year ago
English,
1 year ago
Psychology,
1 year ago