网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
Given: Which regular expression, inserted at line 12, correctly splits 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[/.]+";
参考答案
参考解析
解析:
暂无解析
更多 “单选题Given: Which regular expression, inserted at line 12, correctly splits 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[/.]+";” 相关考题
考题
下列语句输出结果为( )。 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.falseB.trueC.0D.1
考题
Stringtest=TestA.TestB.TestC.”;12.//insertcodehere13.String[]result=test.split(regex);Whichregularexpressioninsertedatline12willcorrectlysplittestintoTestA,”TestB,”andTestC”?()
A.Stringregex=“”;B.Stringregex=““;C.Stringregex=“.*“.D.Stringregex=“\\s”E.Stringregex=“\\.\\s*”;F.Stringregex=“\\w[\.]+“;
考题
Given:Which regular expression, inserted at line 12, correctly splits 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[\.]+;
考题
Given:11.Stringtest=TestA.TestB.TestC.;12.//insertcodehere13.String[]result=test.split(regex);Whichregularexpression,insertedatline12,correctlysplitstestintoTestA,TestB,andTestC?()A.Stringregex=;B.Stringregex=;C.Stringregex=.*;D.Stringregex=\\s;E.Stringregex=\\.\\s*;
考题
说出下面几个函数的区别:private void test(string str){…}private void test(ref string str){…}private void test(out string str){…}如果一个页面与数据
考题
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)
考题
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?()A、 Java Test 2222B、 Java Test 1 2 3 4C、 Java Test 4 2 4 2D、 Java Test 4 3 2 1
考题
int index = 1; String test = new String; String foo = test[index]; What is the result?()A、 Foo has the value “”B、 Foo has the value nullC、 An exception is thrownD、 The code will not compile
考题
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、 An exception is thrown at runtime.B、 1C、 4D、 Compilation fails.E、 0
考题
Given: 11.String test = "a1b2c3"; 12.String[] tokens = test.split("//d"); 13.for(String s: tokens) System.out.print(s + " "); What is the result?()A、a b cB、1 2 3C、a1b2c3D、a1 b2 c3
考题
public class Test { public static void main (String[]args) { String foo = args[1]; String bar = args[2]; String baz = args[3]; System.out.printIn(“baz = ” + baz); } } And the output: Baz = 2 Which command line invocation will produce the output?() A、 Java Test 2222B、 Java Test 1 2 3 4C、 Java Test 4 2 4 2D、 Java Test 4 3 2 1
考题
11. String test = “This is a test”; 12. String[] tokens = test.split(”/s”); 13. System.out.println(tokens.length); What is the result?() A、 0B、 1C、 4D、 Compilation fails.E、 An exception is thrown at runtime.
考题
Consider the following class: class Test(int i) { void test(int i) { System.out.println(“I am an int.”); } void test(String s) { System.out.println(“I am a string.”); } public static void main(String args) { Test t=new Test(); char ch=“y”; t.test(ch); } } Which of the statements below is true?()A、 Line 5 will not compile, because void methods cannot be overridden.B、 Line 12 will not compile, because there is no version of test() that rakes a charargument.C、 The code will compile but will throw an exception at line 12.D、 The code will compile and produce the following output: I am an int.E、 The code will compile and produce the following output: I am a String.
考题
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[ /.] +“;
考题
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、0B、1C、4D、Compilation fails.
考题
Given: 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,correctly splits 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*";
考题
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)
考题
单选题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[ /.] +“;
考题
单选题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
An exception is thrown at runtime.B
1C
4D
Compilation fails.E
0
考题
单选题public class Test { public static void main (String[]args) { String foo = args[1]; String bar = args[2]; String baz = args[3]; System.out.printIn(“baz = ” + baz); } } And the output: Baz = 2 Which command line invocation will produce the output?()A
Java Test 2222B
Java Test 1 2 3 4C
Java Test 4 2 4 2D
Java Test 4 3 2 1
考题
单选题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
0B
1C
4D
Compilation fails.
考题
单选题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?()A
Java Test 2222B
Java Test 1 2 3 4C
Java Test 4 2 4 2D
Java Test 4 3 2 1
考题
单选题Given: 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,correctly splits 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*;
考题
单选题11. String test = “This is a test”; 12. String[] tokens = test.split(”/s”); 13. System.out.println(tokens.length); What is the result?()A
0B
1C
4D
Compilation fails.E
An exception is thrown at runtime.
考题
单选题Given: 11.String test = "a1b2c3"; 12.String[] tokens = test.split("//d"); 13.for(String s: tokens) System.out.print(s + " "); What is the result?()A
a b cB
1 2 3C
a1b2c3D
a1 b2 c3
考题
单选题Consider the following class: class Test(int i) { void test(int i) { System.out.println(“I am an int.”); } void test(String s) { System.out.println(“I am a string.”); } public static void main(String args) { Test t=new Test(); char ch=“y”; t.test(ch); } } Which of the statements below is true?()A
Line 5 will not compile, because void methods cannot be overridden.B
Line 12 will not compile, because there is no version of test() that rakes a charargument.C
The code will compile but will throw an exception at line 12.D
The code will compile and produce the following output: I am an int.E
The code will compile and produce the following output: I am a String.
考题
单选题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)
热门标签
最新试卷