public class MainClass { public static void main(String[] argv) { MyInterface my = new MyClass(); Object b = my; } } class MyClass implements MyInterface { } interface MyInterface { }