欢迎来到在线考试题库网 在线考试题库官网
logo
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

Which Man class properly represents the relationship "Man has a best friend who is a Dog"?()

    A.class Man extends Dog{}
    B.class Man implements Dog{}
    C.class Man{private BestFriend dog;}
    D.class Man{private Dog bestFriend;}
    E.class Man{private Dog;}
    F.class Man{private BestFriend;}

点击查看答案

相关考题

  • 多项选择题
    Which two, independently, will allow Sub to compile?()

    A.Change line 2 to:public int a;
    B.Change line 2 to:protected int a;
    C.Change line 13 to:public Sub(){this(5);}
    D.Change line 13 to:public Sub(){super(5);}
    E.Change line 13 to:public Sub(){super(a);}

  • 多项选择题
    Which five methods,inserted independently at line 5,will compile?()

    A.public int blipvert(int x){return 0;}
    B.private int blipvert(int x){return 0;}
    C.private int blipvert(long x){return 0;}
    D.protected int blipvert(long x){return 0;}
    E.protected long blipvert(long x){return 0;}
    F.protected long blipvert(int x, int y){return 0;}

  • 单项选择题
    What is the result?()

    A.Compilation fails.
    B.atom granite
    C.granite granite
    D.atom granite granite
    E.An exception is thrown at runtime.
    F.atom granite atom granite

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

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