Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Person {
- String name;
- public Person(String s){
- name=s;
- }
- }
- //должен быть в отдельном файле
- public class Student extends Person{
- int id;
- public Student(String s, int n) {
- super(s);
- id=n;
- }
- public String toString(){
- return "This is student: "+name;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement