易搜题 > 资格证大类 > 计算机编程 > 问题详情
问题详情

11. String test = “This is a test”;  12. String[] tokens = test.split(”/s”);  13. System.out.println(tokens.length);  What is the result?() 

A、 0

B、 1

C、 4

D、 Compilation fails.

E、 An exception is thrown at runtime.

未找到的试题在搜索页框底部可快速提交,在会员中心"提交的题"查看可解决状态。 收藏该题
查看答案

相关问题推荐

  •  public class Foo implements Runnable (   public void run (Thread t) {   system.out.printIn(“Running.”);   }   public static void main (String args) {   new thread (new Foo()).start();   }   )   What is the result?()  

    A、 An exception is thrown.

    B、 The program exists without printing anything.

    C、 An error at line 1 causes compilation to fail.

    D、 An error at line 2 causes the compilation to fail.

    E、 “Running” is printed and the program exits.

  • abstract class abstrctIt {  abstract float getFloat ();  } public class AbstractTest extends AbstractIt { private float f1= 1.0f;  private float getFloat () {return f1;}  }   What is the result?()  

    A、 Compilation is successful.

    B、 An error on line 6 causes a runtime failure.

    C、 An error at line 6 causes compilation to fail.

    D、 An error at line 2 causes compilation to fail.

  • 5. String foo = “base”;   6. foo.substring(0,3);   7. foo.concat(“ket”)  8.   Type the value of foo at line 8.()

  • Given the fully-qualified class names:  com.foo.bar.Dog  com.foo.bar.blatz.Book  com.bar.Car  com.bar.blatz.Sun  Which graph represents the correct directory structure for a JAR file from which those classes can be used by the compiler and JYM?() 

    A、 Jar A

    B、 Jar B

    C、 Jar C

    D、 Jar D

    E、 Jar E

  • What is wrong with the following code?()   class MyException extends Exception {}   public class Qb4ab {   public void foo() {  try {  bar();  } finally {  baz();   } catch (MyException e) {}  }   public void bar() throws MyException {   throw new MyException();  }   public void baz() throws RuntimeException {   throw new RuntimeException();   }   }  

    A、Since the method foo() does not catch the exception generated by the method baz(), it must declare the RuntimeException in its throws clause.

    B、A try block cannot be followed by both a catch and a finally block.

    C、An empty catch block is not allowed.

    D、A catch block cannot follow a finally block.

    E、A finally block must always follow one or more catch blocks.

联系客服 会员中心
TOP