- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInf1.java
More file actions
Latest commit
24 lines (21 loc) · 392 Bytes
/
Copy pathInf1.java
File metadata and controls
24 lines (21 loc) · 392 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
classTestDemo{
publicstaticvoidmain(String[] args) {
Inf2obj2 = newDemo();
obj2.method1();
obj2.method2();
}
}
interfaceInf1 {
publicvoidmethod1();
}
interfaceInf2extendsInf1 {
publicvoidmethod2();
}
classDemoimplementsInf2 {
publicvoidmethod1() {
System.out.println("Method1");
};
publicvoidmethod2() {
System.out.println("Method2");
}
}