public class Person { // TODO String name; //静态属性 count public static int count; public Person(String name) { this.name = name; Person.count++; } //静态方法 public static int getCount() { return Person.count; } }
Sign in to make a reply
刘晋呈php