As in the above example, Parrot is SubClass i.e ChildClass and Bird is SuperClass i.e ParentClass. The relationship between child class and parent class using extends keyword to show that Parrot is a type of Bird Class.
Here Parrot Class can use the field and method of own class as well as Bird Class.
# | Program | Language |
---|---|---|
1 | Java | |
2 | Java | |
3 | Java | |
4 | Java | |
5 | Java | |
6 | Java | |
7 | Java | |
8 | Java | |
9 | Java | |
10 | Java | |
11 | Java | |
12 | Java | |
13 | Java | |
14 | Java | |
15 | Java | |
16 | Java | |
17 | Java | |
18 | Java | |
19 | Java | |
20 | Java | |
# | Program | Language |
Copyright © 2020 Inovatik - All rights reserved