Skip to content

Commit 7b08a50

Browse files
committed
Experiment 5_2
1 parent cf4dd0a commit 7b08a50

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import java.util.*;
2+
3+
interface A{
4+
public void meth1();
5+
public void meth2();
6+
7+
}
8+
class MyClass implements A{
9+
public void meth1(){
10+
System.out.println("Method 1");
11+
}
12+
public void meth2(){
13+
System.out.println("Method 2");
14+
}
15+
}
16+
public class Exp5_2{
17+
public static void main(String[] args) {
18+
MyClass obj = new MyClass();
19+
obj.meth1();
20+
obj.meth2();
21+
}
22+
}

0 commit comments

Comments
 (0)