-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInterfaceEx2.java
More file actions
56 lines (47 loc) · 1.02 KB
/
InterfaceEx2.java
File metadata and controls
56 lines (47 loc) · 1.02 KB
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
53
54
55
56
interface I1{
void show1();
void display1();
}
interface I2{
void show2();
void display2();
}
public interface InterfaceEx2 extends I1,I2 {
void show3();
void display3();
}
class C1 implements InterfaceEx2{
@Override
public void show1() {
System.out.println("Show1");
}
@Override
public void display1() {
System.out.println("Display1");
}
@Override
public void show2() {
System.out.println("show2");
}
@Override
public void display2() {
System.out.println("Display2");
}
@Override
public void show3() {
System.out.println("show3");
}
@Override
public void display3() {
System.out.println("Display3");
}
public static void main(String[] args) {
InterfaceEx2 interfaceEx2 = new C1();
interfaceEx2.show3();
interfaceEx2.show1();
interfaceEx2.show2();
interfaceEx2.display3();
interfaceEx2.display1();
interfaceEx2.display2();
}
}