-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerson.java
More file actions
49 lines (37 loc) · 880 Bytes
/
Person.java
File metadata and controls
49 lines (37 loc) · 880 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
class Testing {
public static void main(String[] args) {
Manager2 obj1 = new Manager2();
System.out.printf("\n");
Manager2 obj2 = new Manager2(4);
System.out.printf("\n");
Manager2 obj3 = new Manager2(4, 8);
}
}
class Person {
public Person() {}
public Person(int i) {}
public Person(int i, int j) {}
}
class Employee1 extends Person {
public Employee1() {}
public Employee1(int i) {
super(i);
System.out.println(i);
}
public Employee1(int i, int j) {
super(i, j);
System.out.println(i+" "+j);
}
}
public class Manager2 extends Employee1 {
public Manager2() {
}
public Manager2(int i) {
super(i);
System.out.println(i);
}
public Manager2(int i, int j) {
super(i, j);
System.out.println(i+" "+j);
}
}