summaryrefslogtreecommitdiff
path: root/oop/02-inheritance-01/App.java
blob: 5ab7c3c34abf85718f417e0be8456fe7b808021c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
public class App {
    public static void main(String[] args) {
        Person p1 = new Person("Kamal");
        System.out.println(p1.toString());

        Student s1 = new Student("Tharindu", "ST003");
        System.out.println(s1.toString());

        Person p2 = new Student("Yasas", "ST002");
        System.out.println(p2.toString());
    }
}