代码在此
package bao; public class sum { public static int a=0; int c; public sum(int cc) { c=cc; a++; } public int get() { return a; } } package bao; public class D_X3 { public static void main(String[] args) { //TODO Auto-generated method stub //调用 sum one=new sum(2); //sum tow=new sum(3); sum three=new sum(3); //输出 System.out.println(one.get()); } }