聯(lián)系客服微信掃一掃關(guān)注公眾號后聯(lián)系客服
掃碼練習(xí)微信掃碼免費搜題
  • 首頁

  • 網(wǎng)課

  • 桌面端

  • 搜標(biāo)題
  • 搜題干
  • 搜選項
單項選擇題

Given a method that must ensure that its parameter is not null:
11. public void someMethod(Object value) {
12. // check for null value
...
20. System.out.println(value.getClass());
21. }
What inserted at line 12, is the appropriate way to handle a null value?()

A.assert value == null;
B.assert value != null, "value is null";
C.if (value == null) { throw new AssertionException("value is null"); }
D.if (value == null) { throw new IllegalArgumentException("value is null"); }

題目列表

你可能感興趣的試題

  • 單項選擇題

    A team of programmers is involved in reviewing a proposed design for a new utility class. After some discussion, they realize that the current design allows other classes to access methods in the utility class that should be accessible only to methods within the utility class itself.
    What design issue has the team discovered?()

    A.Tight coupling
    B.Low cohesion
    C.High cohesion
    D.Loose coupling
    E.Weak encapsulation

  • 單項選擇題

    Given:
    11.double input = 314159.26;
    12.NumberFormat nf = NumberFormat.getInstance(Locale.ITALIAN);
    13.String b;
    14.//insert code here
    Which code, inserted at line 14, sets the value of b to 314.159,26?()

    A.b = nf.parse( input );
    B.b = nf.format( input );
    C.b = nf.equals( input );
    D.b = nf.parseObject( input );

掃碼聯(lián)系掃碼聯(lián)系在線客服
反饋使用問題
掃碼練習(xí)掃碼使用小程序
手機掃碼

版權(quán)所有?考試資料網(wǎng)(ppkao.com) All Rights Reserved

  • 聯(lián)系客服
  • 小程序
  • 桌面端下載
  • 回到頂部

感谢您访问我们的网站,您可能还对以下资源感兴趣:

国产福利小视频尤物98
    1. <td id="ys239"><strong id="ys239"></strong></td>