-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathep9.java
33 lines (32 loc) · 807 Bytes
/
ep9.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class Base{
Base(){
System.out.println("this is Base constructor");
}
Base (int n){
System.out.println("Base no. is = "+n);
}
}
class Derived extends Base{
Derived(){
//super(99);
System.out.println("this is Derived constrctor");
}
Derived(int n, int m){
super(n);
System.out.println("Derived value is = "+m);
}
}
class childofderived extends Derived{
childofderived(int n, int m, int o){
super(n, m);
System.out.println("childofderived's value is = "+o);
}
}
public class ep9 {
public static void main(String[] args) {
//Base b = new Base();
//Derived d = new Derived();
//Derived d = new Derived(69,96);
childofderived cd = new childofderived(69, 96, 88);
}
}