-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterfaces3.java
More file actions
40 lines (30 loc) · 817 Bytes
/
interfaces3.java
File metadata and controls
40 lines (30 loc) · 817 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
//inheritance in interfaces
//interface se interference extend ho skta hai
//class se interferencw extend nahi ho skta .... uske liye impliment karna pdta hai
//interference inherete ho skte hai
interface sampleinterface {
void meth1();
void meth2();
}
interface childsampleinterface extends sampleinterface {
void meth3();
void meth4();
}
class myclass implements childsampleinterface {
public void meth1() {
System.out.println("meth ");
}
public void meth2() {
System.out.println("meth 2");
}
public void meth3() {
System.out.println("meth 3");
}
public void meth4() {
System.out.println("meth 4");
}
}
public class interfaces3 {
public static void main(String[] args) {
}
}