- interface interfaceCase
- {
- public void function();
-
- }
- public class InterfaceImpl implements interfaceCase
- {
-
- public void function()
- {
-
- System.out.println("1111111111111");
-
- }
-
- public static void main(String[] args)
- {
-
- InterfaceImpl interfaceImpl=new InterfaceImpl();
-
- interfaceImpl.function();
- System.out.println(interfaceImpl.toString());
- }
- }
复制代码 interfaceImpl为什么能调用Object类中的方法?
|