public class Person{
String name;
int age;
public Person(String name){
this.name = name;
}
public Person(String name,int age){
this(name);
this.age = age;
}
}
this表示对象本身呗
构造函数是一个非静态函数吧
非静态函数应该用对象调用吧 so this();
如果用类名调用构造函数不就是静态函数了 这样还怎么面向对象
this是实例化以后的
对象是个声明
static修饰的变量可以用类名直接访问,代表是这个类的,不管是否实例化都一样,而普通的就只能实例化后访问