black

SCJP程序员认证考试

登录

单项选择题

public class Test{ 
public static void main( String[] argv ){ 
// insert statement here 
} 
}  
Which statement, inserted at line 3, produces the following output?() 
Exception in thread “main” java.lang.AssertionError: true at Test.main(Test.java:3)  

A. assert true;
B. assert false;
C. assert false : true;
D. assert false == true;
E. assert false: false;

相关考题

单项选择题 public class Delta {  static boolean foo(char c) {  System.out.print(c);  return true;  }  public static void main( String[] argv ) {  int i =0;  for ( foo(‘A’); foo(‘B’)&&(i<2);&ensp;foo(‘C’)){  i++ ;  foo(‘D’);  }  }  }  What is the result?()

多项选择题 class A {  protected int method1(int a, int b) { return 0; }  }  Which two are valid in a class that extends class A?()

单项选择题 package test1;  public class Test1 {  static int x = 42;  }  package test2;  public class Test2 extends test1.Test1 {  public static void main(String[] args) { System.out.println(“x = “ + x);  }  }  What is the result?()

All Rights Reserved 版权所有©财会考试题库(ckkao.com)

备案号:湘ICP备2022003000号-2