Skip to content

Commit cf4dd0a

Browse files
committed
Experiment 5_1
1 parent e345414 commit cf4dd0a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import java.util.*;
2+
3+
interface test {
4+
public int square(int i);
5+
}
6+
class Arithmetic implements test{
7+
public int square(int i){
8+
return i*i;
9+
}
10+
}
11+
class ToTestInt {
12+
public static void main(String[] args) {
13+
Arithmetic obj = new Arithmetic();
14+
System.out.println(obj.square(2));
15+
}
16+
}

0 commit comments

Comments
 (0)