• 2022-05-31
    11. String test = “Test A. Test B. Test C.”;  12. // insert code here  13. String[] result = test.split(regex);  Which regular expression inserted at line 12 will correctly split test into “Test A,” “Test B,” and “Test C”?()
    A:  String regex = “”;
    B:  String regex = “ “;
    C:  String regex = “.*“.
    D:  String regex = “\\s”
    E:  String regex = “\\.\\s*”;
    F:  String regex = “\\w[ \.] +“;
  • E

    举一反三

    内容

    • 0

      Given: 11. String test = "This is a test"; 12. String[] tokens = test.split("/s"); 13. System.out.println(tokens.length); What is the result?() A: A An exception is thrown at runtime. B: B 1 C: C 4 D: D Compilation fails. E: E 0

    • 1

      hive里创建表test,表里添加两个字段id和name,以下哪个HQL是正确的( ) A: create test(id int, name string); B: create test(int id, string name); C: create table test(int id, string name); D: create table test(id int, name string)

    • 2

      请阅读下面的程序 class Test { private static String name; static { name = "World"; System.out.print (name); } public static void main(String[] args) { System.out.print("Hello"); Test test = new Test(); } } 下列选项中,程序运行结果是

    • 3

      编写程序将String类型字符串”test” 变为 “tset

    • 4

      public class Test { public static void main(String[] args) { String s1 = "abc"; String s2 = new String ("abc"); System.out.println(s1 == s2); } } 程序运行结果是