interface MyInterface { void exposed(); } class MyClass implements MyInterface { public void exposed() {} public void hidden() {} } public static void main(String[] args) { MyInterface i = new MyClass(); }
参考文献: Java Quick Syntax Reference by Mikael Olsson
Java 语法 索引 ----- 接口
时间: 2024-10-29 19:06:26