Untitled
unknown
plain_text
2 years ago
336 B
2
Indexable
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)); } }
Editor is loading...