欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

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.

点击查看答案&解析
微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题