summaryrefslogtreecommitdiff
path: root/Year_2/SE/error_inheritance/Person.java
blob: 2e52d791707615c01274e08db4cbbf4330268dc3 (plain)
1
2
3
4
5
6
7
8
9
10
public class Person {
    private String name;
    public void setName(String n) {
        this.name = n;
    }

    public void print() {
        System.out.println("Hello, "+ this.name);
    }
}