欢迎来到求知题库网 求知题库官网
logo
全部科目 > 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.编译失败

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题