直入主题:
package java_learning;
class people{
private int age;
private String name;
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
class student extends people{ //java不允许写连续的两个继承
private int sorce;
public int getSorce() {
return sorce;
}
public void setSorce(int sorce) {
this.sorce = sorce;
}
}
public class text {
public static void main(String[] args)
{
}
}