欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > SCJP程序员认证考试

多项选择题

public class Team extends java.util.LinkedList { 
public void addPlayer(Player p) { 
add(p); 
} 
public void compete(Team opponent) { /* more code here */ } 
} 
class Player { /* more code here */ } 
Which two are true?()

    A. This code will compile.
    B. This code demonstrates proper design of an is-a relationship.
    C. This code demonstrates proper design of a has-a relationship.
    D. A Java programmer using the Team class could remove Player objects from a Team object.

点击查看答案&解析

相关考题

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

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