black

SCJP程序员认证考试

登录

单项选择题

public class Test { 
public static void main(String [] args) { 
boolean assert = true; 
if(assert) { 
System.out.println(”assert is true”); 
} 
} 
}
Given: 
javac -source 1.3 Test.java 
What is the result?() 

A. Compilation fails.
B. Compilation succeeds with errors.
C. Compilation succeeds with warnings.
D. Compilation succeeds without warnings or errors.

相关考题

单项选择题 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?()

多项选择题 public class test {  public static void main(String [] a) {  assert a.length == 1;  }  }  Which two will produce an AssertionError?()

单项选择题 public static void main(String[] args) {  for (int i=0;i<= 10;i++){  if( i>6) break;  }  System.out.println(i);  }  What is the result?()

All Rights Reserved 版权所有©考试题库网(kstiku.com)

备案号:湘ICP备14005140号-3

经营许可证号:湘B2-20140064