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

Java认证考试

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

public class CreditCard {  private String cardlD;  private Integer limit;  public String ownerName;  public void setCardlnformation(String cardlD,  String ownerName, 28. Integer limit) {  this.cardlD = cardlD;  this.ownerName = ownerName;  this.limit = limit;  }  } Which is true?() 

  • A、 The class is fully encapsulated.
  • B、 The code demonstrates polymorphism.
  • C、 The ownerName variable breaks encapsulation.
  • D、 The cardlD and limit variables break polymorphism.
  • E、 The setCardlnformation method breaks encapsulation.
正确答案:C
答案解析:
进入题库查看解析

微信扫一扫手机做题