Computer Science, asked by xitoja4044, 8 months ago

What is a class? How does it accomplish data hiding? Explain with the help of an
example

Answers

Answered by harshrajput96
0

Answer:

Data hiding ensures exclusive data access to class members and protects object integrity by preventing unintended or intended changes. The best example of Data Hiding would be String. Now String in Java is a class but we treat it as a datatype.

Similar questions