Home Page > Learning the Java Language > Language Basics > Variables
2014年1月06日 16:55
简单总结面向对象编程概念
Object(对象)
Software objects have state(状态) in fields (variables) and expose its behavior through methods(方法).
Data encapsulation = Hiding internal state and requiring all interaction to be performed through an object's methods.
Software objects benefits:
Modularity: The source code for an object can be written and maintained independently of the source code for other objects.
Information-hiding: Internal implementation details remain hidden
Code re-use
Pluggability and debugging ease: Remove a problematic object from your application and plug in a different one.