继承格式:
package javatest2;public class people {int age;double workday;public people(int age, double workday) {this.age = age;this.workday = workday;}
}
package javatest2;public class student extends people {int studyday;public student(int age, double workday, int studyday) {super(age, workday);this.studyday = studyday;}}
package javatest2;public class test {public static void main(String[] args) {student s =new student(5,5,5);System.out.println(s.studyday);}
}