摘要:
1 class FatherClass { 2 public int value; 3 public void f(){ 4 value = 100; 5 System.out.println 6 ("FatherClass.value="+value); 7 } 8 } 9 10 class ChildClass extends FatherClass {11 public int value;12 public void f() {13 super.f();14 val... 阅读全文
摘要:
1 class Person { 2 private String name; 3 private int age; 4 public void setName(String name){this.name=name;} 5 public void setAge(int age) {this.age=age;} 6 public String getName(){return name;} 7 public int getAge(){return age;} 8 public String getInfo() { 9 ... 阅读全文