网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

public static void search(List list) {  list.clear();  list.add(”b”);  list.add(”a”);  list.add(”c”);  System.out.println(Collections.binarySearch(list, “a”));  }  What is the result of calling search with a valid List implementation?()

  • A、0
  • B、1
  • C、a
  • D、b
  • E、c
  • F、The result is undefined.

参考答案

更多 “ public static void search(List list) {  list.clear();  list.add(”b”);  list.add(”a”);  list.add(”c”);  System.out.println(Collections.binarySearch(list, “a”));  }  What is the result of calling search with a valid List implementation?()A、0B、1C、aD、bE、cF、The result is undefined.” 相关考题
考题 Which statement is true about assertion in the Java programming language?()  A、 Assertion expressions should not contain side effects.B、 Assertion expression values can be any primitive type.C、 Assertion should be used for enforcing preconditions on public methods.D、 An AssertionError thrown as a result of a failed assertion should always be handled by the enclosing method.

考题 为了实现自定义对象的序列化,该自定义对象必须实现哪个接口?()     A、 VolatileB、 SerializableC、RunnableD、 Transient

考题 int I=1, j=0   switch(i) {   case 2:   j+=6;   case 4:   j+=1;    default:    j +=2;   case 0:   j +=4;   }   What is the value of j at line 16?()A、 0B、 1C、 2D、 4E、 6

考题 public class Alpha{  public static void main( string[] args ){  if ( args.length == 2 ) {  if ( args.[0].equalsIgnoreCase(“-b”) )  System.out.println( new Boolean( args[1] ));  }  }  }   And the code is invoked by using the command: java Alpha –b TRUE   What is the result?()  A、 trueB、 nullC、 falseD、 Compilation fails.E、 The code runs with no output.F、 An exception is thrown at runtime.

考题 以下哪个组件不支持动作监听器?()A、文本框B、下拉框C、按钮D、列表框

考题 现有:  1.class Over  {  2.int dolt (long x)  {  return 3;  }      3.  }      4.  5. class Under extends Over  {      6.//insert code here      7.  }  和四个方法:  short dolt (int y)  {  return 4;  }  int dolt(long Xr long y)  {  return 4;  }      private int dolt(short y)  {  return 4;  }     protected int dolt (long x)  {  return 4;  }      分别插入到第6行,有几个可以通过编译?()     A、  1B、  2C、  3D、  4