试题详情
单项选择题 public class AssertStuff {  public static void main(String [] args) {  int x= 5;  int y= 7;  assert (x> y): “stuff”;  System.out.println(”passed”);  }  }  And these command line invocations:java AssertStuff java -ea AssertStuff What is the result?()

A、 passed stuff

B、 stuff passed

C、 passed      An AssertionError is thrown with the word “stuff” added to the stack trace.

D、 passed      An AssertionError is thrown without the word “stuff” added to the stack trace.

E、 passed      An AssertionException is thrown with the word “stuff” added to the stack trace.

F、 passed     An AssertionException is thrown without the word “stuff” added to the stack trace.

  • C
  • 关注下方微信公众号,在线模考后查看

热门试题