单选题

Given a method that must ensure that its parameter is not null: What, inserted at line 12, is the appropriate way to handle a null value?()

Aassert value == null;

Bassert value != null, "value is null";

Cif (value == null) { throw new AssertionException("value is null"); }

Dif (value == null) { throw new IllegalArgumentException("value is null"); }

正确答案

来源:www.examk.com

答案解析

相似试题
  • Given: Which statement is true?()

    单选题查看答案

  • Given: What can be a result?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案