String regex="";
String regex=" .";
String regex=".*";
String regex="//s";
String regex="//.//s*";
String regex="//w[/.]+";
第1题:
A.String regex="";
B.String regex=" .";
C.String regex=".*";
D.String regex="\\s";
E.String regex="\\.\\s*";
F.String regex="\\w[\.]+";
第2题:
说出下面几个函数的区别:
private void test(string str){…}
private void test(ref string str){…}
private void test(out string str){…}
如果一个页面与数据
第3题:
下列语句输出结果为( )。 public class test\ { public static void main (String args[]) { String s1=new String("How"); String s2=new String("How"); System.out.println(!(s1.equals(s2))); } }
A.false
B.true
C.0
D.1
第4题:
Given: 11. String test = "This is a test"; 12. String[] tokens = test.split("/s"); 13. System.out.println(tokens.length); What is the result?()
第5题:
public class Test { public static void main (Stringargs) { String foo = args[1]; String bar = args; String baz = args; System.out.printIn(“baz = ” + baz); } } And the output: Baz = 2 Which command line invocation will produce the output?()
第6题:
Given:11.Stringtest="TestA.TestB.TestC.";12.//insertcodehere13.String[]result=test.split(regex);Whichregularexpression,insertedatline12,correctlysplitstestinto"TestA","TestB",and"TestC"?()
A.Stringregex="";
B.Stringregex="";
C.Stringregex=".*";
D.Stringregex="\\s";
E.Stringregex="\\.\\s*";
第7题:
You define the following regular expression of currency values:regex tx = new regex("^-?\d+(\.\d{2})?$")You are required to write code that will be used to find whether a string in the variable named Bill matches the regular expression or not. You are also required to use this code as the expression in a conditional statement and need to know which code segment to use.What should you do?()
A.The tx.Matches(Bill)
B.The tx.Equals(Bill)
C.The tx.Match(Bill)
D.The tx.IsMatch(Bill)
第8题:
A.Stringregex=“”;
B.Stringregex=““;
C.Stringregex=“.*“.
D.Stringregex=“\\s”
E.Stringregex=“\\.\\s*”;
F.Stringregex=“\\w[\.]+“;
第9题:
int index = 1; String test = new String; String foo = test[index]; What is the result?()
第10题:
Given: 11.String test = "a1b2c3"; 12.String[] tokens = test.split("//d"); 13.for(String s: tokens) System.out.print(s + " "); What is the result?()