• 2022-06-06
    阅读程序题(给出【代码】注释标注的代码的输出结果)interface Com {int add(int a, int b);public static int get(int n){return n;}public default int see( int n){return n;}public default int look( int n) {return n;}}class A implements Com{public int add( int a, int b) { return a + b;}public int see(int n){ return n + 1;}}public class 习题5_阅读4{public static void main( String args[ ]) {A a = new A();int m = a.add(12,6);int n = Com.get( 12);int t = a.see(6);int q = a.look(6);System.out.printf("%d:%d:%d:%d",m,n, t,q); //【代码】 }}}
  • 举一反三