标签:创建对象 对象 public count class oid out highlight java
public class new1 {
static int n=0;
new1(){
n++;
}
static void count(){
System.out.println(n);
}
}
public class lab {
public static void main(){
new1 a=new new1();
System.out.println(a);
new1 b=new new1();
System.out.println(b);
new1 c=new new1();
System.out.println(c);
new1.count();
}
}
标签:创建对象 对象 public count class oid out highlight java
原文地址:https://www.cnblogs.com/NCLONG/p/9825436.html