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.:Encapsulation is a mechanism to binding data and methods.suppose to take a real time example of java human body name and age are data and action are talk an walk and run these are methods/ process the combination of human body its depending upon the nervous mechanism.
Category:J2SE Interview Questions
No comments:
Post a Comment