J2SE Question:

What is encapsulation?

Tweet Share WhatsApp

Answer:

The localization of knowledge within a module. Because objects encapsulate data and implementation, the user of an object can view the object as a black box that provides services. Instance variables and methods can be added, deleted, or changed, but as long as the services provided by the object remain the same, code that uses the object can continue to use it without being rewritten. See also instance variable, instance method.

Download J2SE PDF Read All 214 J2SE Questions
Previous QuestionNext Question
What is enumerated type?What is else?