网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
Given: 1.package test; 2. 3.class Target { 4.public String name = "hello";5.} What can directly access and change the value of the variable name?()
- A、any class
- B、only the Target class
- C、any class in the test package
- D、any class that extends Target
参考答案
更多 “ Given: 1.package test; 2. 3.class Target { 4.public String name = "hello";5.} What can directly access and change the value of the variable name?()A、any classB、only the Target classC、any class in the test packageD、any class that extends Target” 相关考题
考题
Given:8.intindex=1:9.Boolean[]test=newboolcan[3];10.boolcanfoo=test[index];Whatistheresult()?
A.foohasthevalueof0.B.foohasthevalueofnull.C.foohasthevalueoftrue.D.foohasthevalueoffalse.E.An-exceptionisthrown.F.Thecodewillnotcompile.
考题
public class Test{2.int x=12;3.public void method(intx){4.x+=x;5.System.out.println(x);6.}7.}Given:34.Test t=new Test();35.t.method(5);What is the output from line 5 of the Test class?()
A.5B.10C.12D.17E.24
考题
publicclassTest{publicstaticvoidmain(String[]args){booleanassert=true;if(assert){System.out.println(”assertistrue”);}}}Given:javac-source1.3Test.javaWhatistheresult?()
A.Compilationfails.B.Compilationsucceedswitherrors.C.Compilationsucceedswithwarnings.D.Compilationsucceedswithoutwarningsorerrors.
考题
Given:What can directly access and change the value of the variable name?()
A. any classB. only the Target classC. any class in the test packageD. any class that extends Target
考题
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=Thisisatest;12.String[]tokens=test.split(\s);13.System.out.println(tokens.length);Whatistheresult?()
A.Anexceptionisthrownatruntime.B.1C.4D.Compilationfails.E.0
考题
Given:11.Stringtest=Thisisatest;12.String[]tokens=test.split(\s);13.System.out.println(tokens.length);Whatistheresult?()
A.0B.1C.4D.Compilationfails.
考题
Which two statements are true about the hashCode method?()A、 The hashCode method for a given class can be used to test for object equality and object inequality for that class.B、 The hashCode method is used by the java.util.SortedSet collection class to order theelements within that set.C、 The hashCode method for a given class can be used to test for object inequality, but NOT object equality, for that class.D、 The only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.E、 The hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.
考题
public class Test { public static void main(String [] args) { boolean assert = true; if(assert) { System.out.println(”assert is true”); } } } Given: javac -source 1.3 Test.java What is the result?() A、 Compilation fails.B、 Compilation succeeds with errors.C、 Compilation succeeds with warnings.D、 Compilation succeeds without warnings or errors.
考题
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
考题
1. public class Test { 2. int x= 12; 3. public void method(int x) { 4. x+=x; 5. System.out.println(x); 6. } 7. } Given: 34. Test t = new Test(); 35. t.method(5); What is the output from line 5 of the Test class?() A、 5B、 10C、 12D、 17E、 24
考题
Given the following code: public class Test { void printValue(int m){ do { System.out.println("The value is"+m); } while( --m 10 ) } public static void main(String arg[]) { int i=10; Test t= new Test(); t.printValue(i); } } Which will be output?() A、 The value is 8B、 The value is 9C、 The value is 10D、 The value is 11
考题
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*";
考题
单选题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*;
考题
单选题In your first few days at school you’ll be given a test to help the teachers to ______ you to a class at your level.A
locate B
assign C
deliver D
place
考题
单选题1. public class Test { 2. int x= 12; 3. public void method(int x) { 4. x+=x; 5. System.out.println(x); 6. } 7. } Given: 34. Test t = new Test(); 35. t.method(5); What is the output from line 5 of the Test class?()A
5B
10C
12D
17E
24
考题
单选题Given: 1.package test; 2. 3.class Target { 4.public String name = "hello";5.} What can directly access and change the value of the variable name?()A
any classB
only the Target classC
any class in the test packageD
any class that extends Target
考题
单选题public class Test { public static void main(String [] args) { boolean assert = true; if(assert) { System.out.println(”assert is true”); } } } Given: javac -source 1.3 Test.java What is the result?()A
Compilation fails.B
Compilation succeeds with errors.C
Compilation succeeds with warnings.D
Compilation succeeds without warnings or errors.
考题
单选题Given classes defined in two different files: 1.package util; 2.public class BitUtils{ 3.private static void process(byte[]b){} 4.} 1.package app; 2.public class SomeApp{ 3.public static void main(String[]args){ 4.byte[]bytes=newbyte[256]; 5.//insert code here 6.} 7.} What is required at line 5 in class SomeApp to use the process method of BitUtils?()A
process(bytes);B
BitUtils.process(bytes);C
app.BitUtils.process(bytes);D
util.BitUtils.process(bytes);E
importutil.BitUtils.*;process(bytes);F
SomeApp cannot use the process method in BitUtils.
考题
单选题Given: 1.package test; 2. 3.class Target { 4.public String name = "hello";5.} What can directly access and change the value of the variable name?()A
any classB
only the Target classC
any class in the test packageD
any class that extends Target
考题
多选题Given that www.example.com/SCWCDtestApp is a validly deployed Java EE web application and that all ofthe JSP files specified in the requests below exist in the locations specified. Which two requests,issuedfrom a browser,will return an HTTP 404 error?()Ahttp://www.example.com/SCWCDtestApp/test.jspBhttp://www.example.com/SCWCDtestApp/WEB-INF/test.jspChttp://www.example.com/SCWCDtestApp/WEB-WAR/test.jspDhttp://www.example.com/SCWCDtestApp/Customer/test.jspEhttp://www.example.com/SCWCDtestApp/META-INF/test.jspFhttp://www.example.com/SCWCDtestApp/Customer/Update/test.jsp
考题
单选题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 = "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
考题
单选题Solve the problem and indicate the best of the answer choices given. A certain standardized test taken by business school applicants demands that the test takers answer 37 quantitative questions within 75 minutes. Which of the following is closest to the average amount of time the test takers can spend on each question?A
1 minute, 58 secondsB
2 minutes, 2 secondsC
2 minutes, 5 secondsD
2 minutes, 12 secondsE
121.6 minutes
考题
单选题1.public class Test{ 2.int x=12; 3.public void method(intx){ 4.x+=x; 5.System.out.println(x); 6.} 7.} Given: 34.Test t=new Test(); 35.t.method(5); What is the output from line 5 of the Test class?()A
5B
10C
12D
17E
24
考题
单选题Given the following code: public class Test { void printValue(int m){ do { System.out.println("The value is"+m); } while( --m 10 ) } public static void main(String arg[]) { int i=10; Test t= new Test(); t.printValue(i); } } Which will be output?()A
The value is 8B
The value is 9C
The value is 10D
The value is 11
考题
单选题Given: What is the result?()A
test endB
Compilation fails.C
test runtime endD
test exception endE
A Throwable is thrown by main at runtime.
考题
单选题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[/.]+";
热门标签
最新试卷