Skip to content

Commit 0e7fb9f

Browse files
authored
Create Interface.java
1 parent 12a3025 commit 0e7fb9f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Interface.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
interface Interface //Interface
2+
{
3+
void print();
4+
}
5+
interface Show extends Interface
6+
{
7+
void show();
8+
}
9+
class TestInterface implements Show
10+
{
11+
public void print()
12+
{
13+
System.out.println("Hello");
14+
}
15+
public void show()
16+
{
17+
System.out.println("Java");
18+
}
19+
20+
public static void main(String args[])
21+
{
22+
TestInterface b = new TestInterface();
23+
b.print();
24+
b.show();
25+
}
26+
}

0 commit comments

Comments
 (0)