📄 getinterfaces.java
字号:
interface if0 {}interface if1 {}class cl implements if0, if1 {}class GetInterfaces { public static void main(String argv[]) { try { Class c = Class.forName("cl"); Class interfaces[] = c.getInterfaces(); // It's all done allready :-( System.out.println("Hello world!"); for(int i=0; i<interfaces.length; i++) { System.out.println("interface" + i + ": " + interfaces[i].getName()); } } catch (Exception e) { System.out.println("Exception caught: " + e.toString()); } }}/* Expected Output:Hello world!interface0: if0interface1: if1*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -