Interview Questions

What is encapsulation technique?

Networking Programming Interview Questions and Answers


(Continued from previous question...)

21. What is encapsulation technique?

ANSWER: Hiding data within the class and making it available only through the methods. This technique is used to protect your class against accidental changes to fields, which might leave the class in an inconsistent state.

Other Interview Questions