简单总结语言基础 --> 操作符, 表达式, 语句和块, 控制流语句

 

Operators(操作符)

 

可以有1或2或3个operands操作数. 优先级从高到低

 

继续阅读

简单总结语言基础 --> 变量

 

Variables(变量)

 

在Java中,field一般指下面的前两个, variable可指下面的全部. A type's fields, methods, and nested types are collectively called its members. 变量有这几类:

Instance Variables (Non-Static Fields)实例变量

    没有用关键字static声明, object存自己的状态, 每个类的实例的实例变量的值都不同.

继续阅读

简单总结面向对象编程概念

 

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.

 

继续阅读