面向对象:
1,特征:
a)封装
b)继承
c)多态
2,类和对象的关系
现实生活中的对象:张三,李四。
想要描述:提取对象中共性内容,对具体的抽象。
描述时:这些对象的共性有:姓名,年龄,性别,学习Java功能。
3,映射到Java中,描述就是class定的类。
具体对象就是对应Java在堆内存中用new建立起来的实体。
4,类就是:对现实生活中事物的描述。
对象:就是这类事物,实实在在存在的个体。
5,属性对应类中的变量,行为对应类中的方法(函数)。
6,其实定义类,就是描述事物,就是在定义属性和行业,属性和行业共同成为类中的成员(成员变量和成员方法)。