移动端

  • 题王微信公众号

    题王微信公众号

    微信搜“题王网”真题密题、最新资讯、考试攻略、轻松拿下考试

单选题

public class ItemTest {  private final mt id;  public ItemTest(int id) { this.id = id; }  public void updateId(int newId) { id = newId; }  public static void main(String[] args) {  ItemTest fa = new ItemTest(42);  fa.updateId(69);  System.out.println(fa.id);  }  }  What is the result?() 

发布日期:2020-04-10

public class ItemTest {  private final mt id;  pub...
A

Compilation fails.

B

An exception is thrown at runtime.

C

The attribute id in the Item object remains unchanged.

D

The attribute id in the Item object is modified to the new value.

E

A new Item object is created with the preferred value in the id attribute.

题王网让考试变得更简单

扫码关注题王,更多免费功能准备上线!

此试题出现在

CMS专题

CMS专题

去刷题
热门试题热门资讯 相关试题

暂无相关推荐~