网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
Given a correctly compiled class whose source code is: package com.sun.sjcp; public class Commander { public static void main(String[] args) { // more code here } } Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains “.“ (current directory). Which command line correctly runs Commander?()
A
java Commander
B
java com. sim. sjcp.Commander
C
java com/sun/sjcp/Commander
D
java -cp com.sun.sjcp Commander
E
java -cp com/sun/sjcp Commander
参考答案
参考解析
解析:
暂无解析
更多 “单选题Given a correctly compiled class whose source code is: package com.sun.sjcp; public class Commander { public static void main(String[] args) { // more code here } } Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains “.“ (current directory). Which command line correctly runs Commander?()A java CommanderB java com. sim. sjcp.CommanderC java com/sun/sjcp/CommanderD java -cp com.sun.sjcp CommanderE java -cp com/sun/sjcp Commander” 相关考题
考题
Given:Which three methods, inserted individually at line 14, will correctly complete class Two?()
A.int foo() { /* more code here */ }B.void foo() { /* more code here */ }C.public void foo() { /* more code here */ }D.private void foo() { /* more code here */ }E.protected void foo() { /* more code here */ }
考题
Given:10. interface Data { public void load(); }11. abstract class Info { public abstract void load(); }Which class correctly uses the Data interface and Info class?()()
A.B.C.D.E.F.
考题
Given:Which two, inserted at line 11, will allow the code to compile?()
A.public class MinMax? {B.public class MinMax? extends Number {C.public class MinMaxN extends Object {D.public class MinMaxN extends Number {E.public class MinMax? extends Object {F.public class MinMaxN extends Integer {
考题
Given:Which method will complete this class?()
A.public int compareTo(Object o){/*more code here*/}B.public int compareTo(Score other){/*more code here*/}C.public int compare(Score s1,Score s2){/*more code here*/}D.public int compare(Object o1,Object o2){/*more code here*/}
考题
Given two files, GrizzlyBear.java and Salmon.java:If both classes are in the correct directories for their packages, and the Mammal class correctly defines the findSalmon() method, which change allows this code to compile?()A.add import animals.mammals.*; at line 2 in Salmon.javaB.add import animals.fish.*; at line 2 in GrizzlyBear.javaC.add import animals.fish.Salmon.*; at line 2 in GrizzlyBear.javaD.add import animals.mammals.GrizzlyBear.*; at line 2 in Salmon.java
考题
Click the Exhibit button. Given:Which two statements are true if a NullPointerException is thrown on line 3 of class C? ()
A.The application will crash.B.The code on line 29 will be executed.C.The code on line 5 of class A will execute.D.The code on line 5 of class B will execute.E.The exception will be propagated back to line 27.
考题
( )refers to the range of computer hardware and OS platforms on which the source code of a program can be compiled and run.A.Usability
B.Portability
C.Reliability
D.Maintainability
考题
class One { void foo() {} } class Two extends One { //insert method here } Which three methods, inserted individually at line 14, will correctly complete class Two?()A、 int foo() { /* more code here */ }B、 void foo() { /* more code here */ }C、 public void foo() { /* more code here */ }D、 private void foo() { /* more code here */ }E、 protected void foo() { /* more code here */ }
考题
You are working on a debug build of an application.You need to find the line of code that caused an exception to be thrown. Which property of the Exception class should you use to achieve this goal?()A、DataB、MessageC、Stack TraceD、Source
考题
Given a correctly compiled class whose source code is: package com.sun.sjcp; public class Commander { public static void main(String[] args) { // more code here } } Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains “.“ (current directory). Which command line correctly runs Commander?() A、 java CommanderB、 java com. sim. sjcp.CommanderC、 java com/sun/sjcp/CommanderD、 java -cp com.sun.sjcp CommanderE、 java -cp com/sun/sjcp Commander
考题
Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo() method, which two statements are true?()A、The class implements java.lang.Comparable.B、The class implements java.util.Comparator.C、The interface used to implement sorting allows this class to define only one sort sequence.D、The interface used to implement sorting allows this class to define many different sort sequences.
考题
In which two web application directories can dependent classes and libraries be located? ()A、 /WEB-INF/lib as a JAR fileB、 /META-INF/lib as a JAR fileC、 /classes as compiled class filesD、 /WEB-INF/lib as compiled class filesE、 /WEB-INF/classes as compiled class filesF、 /META-INF/classes as compiled class files
考题
In your Certkiller .com database server the parameter PLSQL_CODE_TYPE has been set to NATIVE. Which object would be achieved by the setting?()A、The source PL/SQL code will be stored in native machine code.B、The source PL/SQL code will be stored in interpreted byte code.C、The compiled PL/SQL code will be stored in native machine code.D、The compiled PL/SQL code will be stored in interpreted byte code.
考题
Given the following directory structure: bigProject |--source ||--Utils.java| |--classes |-- And the following command line invocation: javac -d classes source/Utils.java Assume the current directory is bigProject,what is the result?()A、If the compile is successful, Utils.class is added to the source directory.B、The compiler returns an invalid flag error.C、If the compile is successful, Utils.class is added to the classes directory.D、If the compile is successful, Utils.class is added to the bigProject directory.
考题
单选题In your Supportcenter.cn database server the parameter PLSQL_CODE_TYPE has been set to NATIVE. Which object would be achieved by the setting?()A
The source PL/SQL code will be stored in native machine code.B
The source PL/SQL code will be stored in interpreted byte code.C
The compiled PL/SQL code will be stored in native machine code.D
The compiled PL/SQL code will be stored in interpreted byte code.
考题
多选题Given: Which two methods, inserted independently at line 17, correctly complete the Sales class?()Adouble getSalesAmount() { return 1230.45; }Bpublic double getSalesAmount() { return 1230.45; }Cprivate double getSalesAmount() { return 1230.45; }Dprotected double getSalesAmount() { return 1230.45; }
考题
单选题In your Certkiller .com database server the parameter PLSQL_CODE_TYPE has been set to NATIVE. Which object would be achieved by the setting?()A
The source PL/SQL code will be stored in native machine code.B
The source PL/SQL code will be stored in interpreted byte code.C
The compiled PL/SQL code will be stored in native machine code.D
The compiled PL/SQL code will be stored in interpreted byte code.
考题
多选题Click the Exhibit button. Given: Which two statements are true if a NullPointerException is thrown on line 3 of class C?()AThe application will crash.BThe code on line 29 will be executed.CThe code on line 5 of class A will execute.DThe exception will be propagated back to line 27.EThe code on line 5 of class B will execute.
考题
多选题Given: 10. class One { 11. void foo() { } 12. } 13. class Two extends One { 14. //insert method here 15. } Which three methods, inserted individually at line 14, will correctly complete class Two?()Apublic void foo() { /* more code here */ }Bprivate void foo() { /* more code here */ }Cprotected void foo() { /* more code here */ }Dint foo() { /* more code here */ }Evoid foo() { /* more code here */ }
考题
多选题class One { void foo() {} } class Two extends One { //insert method here } Which three methods, inserted individually at line 14, will correctly complete class Two?()Aint foo() { /* more code here */ }Bvoid foo() { /* more code here */ }Cpublic void foo() { /* more code here */ }Dprivate void foo() { /* more code here */ }Eprotected void foo() { /* more code here */ }
考题
多选题Given: Which three methods, inserted individually at line 14, will correctly complete class Two?()Aint foo() { /* more code here */ }Bvoid foo() { /* more code here */ }Cpublic void foo() { /* more code here */ }Dprivate void foo() { /* more code here */ }Eprotected void foo() { /* more code here */ }
考题
多选题Given: 3.class MyServlet extends HttpServlet { 4.public void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException,IOException { 5.// servlet code here ... 26.} 27.} If the DD contains a single security constraint associated with MyServlet and its only tagsand tags are:GETPUT Admin Which four requests would be allowed by the container?()AA user whose role is Admin can perform a PUT.BA user whose role is Admin can perform a GET.CA user whose role is Admin can perform a POST.DA user whose role is Member can perform a PUT.EA user whose role is Member can perform a POST.FA user whose role is Member can perform a GET.
考题
填空题Given the following code, write a line of code that, when inserted at the indicated location, will make the overriding method in Extension invoke the overridden method in class Base on the current object. class Base { public void print( ) { System.out.println("base"); } } class Extention extends Base { public void print( ) { System.out.println("extension"); // insert line of implementation here } } public class Q294d { public static void main(String args[]) { Extention ext = new Extention( ); ext.print( ); } } Fill in a single line of implementation.()
考题
单选题Given the following directory structure: bigProject |--source ||--Utils.java| |--classes |-- And the following command line invocation: javac -d classes source/Utils.java Assume the current directory is bigProject,what is the result?()A
If the compile is successful, Utils.class is added to the source directory.B
The compiler returns an invalid flag error.C
If the compile is successful, Utils.class is added to the classes directory.D
If the compile is successful, Utils.class is added to the bigProject directory.
考题
多选题In which two web application directories can dependent classes and libraries be located? ()A/WEB-INF/lib as a JAR fileB/META-INF/lib as a JAR fileC/classes as compiled class filesD/WEB-INF/lib as compiled class filesE/WEB-INF/classes as compiled class filesF/META-INF/classes as compiled class files
考题
多选题Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo() method, which two statements are true?()AThe class implements java.lang.Comparable.BThe class implements java.util.Comparator.CThe interface used to implement sorting allows this class to define only one sort sequence.DThe interface used to implement sorting allows this class to define many different sort sequences.
考题
单选题Given this method in a class: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append(‟‟); return buffer.toString(); } Which is true?()A
This code is NOT thread-safe.B
The programmer can replace StringBuffer with StringBuilder with no other changes.C
This code will perform well and converting the code to use StringBuilder will not enhance the performance.D
This code will perform poorly. For better performance, the code should be rewritten: return ““+ this.name + “”;
热门标签
最新试卷