Interview Questions

QUESTION: What is encapsulation technique? (asked by Microsoft)

Socket programming interview question


(Continued from previous question...)

QUESTION: What is encapsulation technique? (asked by Microsoft)

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.

(Continued on next question...)

Other Interview Questions