The final chapter of the class and the object (tortured to live and die) summary

**1. Class and Object

					类是一个模板:是抽象的,对象是一个具体的实例

2. Method

					掌握定义、调用

3. Corresponding references:

					引用类型: 除了 基本类型(8)之外的都是引用类型
					引用类型:对象是通过引用来操作的:栈-->堆(实际上操作的是地址)-----(注意java中内存可分为栈、堆(方法区属于堆))

4. Attribute: Field member variable

					默认初始值:数字:0   0.0
										  char:u0000
										  Boolean:false
										  引用:null
					修饰符  属性类型  属性名 = 属性值;  

5. Creation and use of objects:

				 	必须使用new 关键字创造对象,构造器 Person s=new Person();
				 	对象的属性 s.name=xxx;
				 	对象的方法 s.方法();

6. Class

					静态的属性   属性
					动态的行为   方法**

Link: Detailed explanation of classes and objects .
Transfer from CSDN ---- Z is locked

Guess you like

Origin blog.csdn.net/m0_52646273/article/details/114155639