Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
336 B
0
Indexable
Never
interface Test {
    int square(int num);
}
class Arithmetic implements Test {
    public int square(int num) {
        return num * num;
    }
}
class ToTestInt {
    public static void main(String[] args) {
        Arithmetic obj = new Arithmetic();
        System.out.println("Square of 5 is: " + obj.square(5));
    }
}