01: interface TheInterface {
02: void print();
03: }
04:
05: class TheClass implements TheInterface {
06: public void print() {
07: System.out.println("TheClass");
08: }
09: }
10:
11: public class ClassConversion {
12: public static void main(String[] args) {
13: TheClass c = new TheClass();
14: TheInterface i = c;
15: i.print();
16: }
17: }
Login in to like
Login in to comment