summaryrefslogtreecommitdiff
path: root/Year_2/SE/error_inheritance/Student.java
blob: 17894895a004acee5fc116fefcbba7b4fd9c9f9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
public class Student extends Person {
    private String matr;

    public void setMatr(String m) {
        this.matr = m;
    }

    @Override
    public void print() {
        super.print();
        System.out.println("I'm "+ this.matr);
    }
}