-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoop11.java
More file actions
52 lines (29 loc) · 672 Bytes
/
Copy pathoop11.java
File metadata and controls
52 lines (29 loc) · 672 Bytes
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
class hello{
int d;
hello(){
System.out.println("Hello my name is hello");
}
hello(int a){
this.d=a;
System.out.println("I am "+d);
}
}
class mello extends hello{
mello(int c,int d){
super(d);
System.out.println("Hello mello"+d);
}
}
class chello extends mello{
chello(int a ,int b,int c){
super(5,7);
System.out.println(a+b+c);
}
}
public class oop11 {
public static void main(String[] args) {
hello hello = new hello(5);
mello mello= new mello( 2,4);
chello chello= new chello(3, 0, 0);
}
}