多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

class BitStuff {   BitStuff go() { System.out.print("bits "); return this; }   }   class MoreBits extends BitStuff {   MoreBits go() { System.out.print("more "); return this; }   public static void main(String [] args) {   BitStuff [] bs = {new BitStuff(), new MoreBits()};   for( BitStuff b : bs)   b.go();   }   }   结果为:()  

  • A、bits bits
  • B、bits more
  • C、more more
  • D、编译失败
正确答案:B
答案解析:
进入题库查看解析

微信扫一扫手机做题