问题:单选题Given: What is the result?()ABBThe code runs with no output.CCompilation fails because of an error in line 12.DCompilation fails because of an error in line 15.ECompilation fails because of an error in line 18.
查看答案
问题:单选题Given: What is the result?()AHelloBHello WorldCCompilation fails.DHello World 5EThe code runs with no output.FAn exception is thrown at runtime.
问题:单选题Given: Which code, inserted at line 14, allows the Sprite class to compile?()ADirection d = NORTH;BNav.Direction d = NORTH;CDirection d = Direction.NORTH;DNav.Direction d = Nav.Direction.NORTH;
问题:单选题Click the Exhibit button. Which statement is true about the classes and interfaces in the exhibit?()ACompilation will succeed for all classes and interfaces.BCompilation of class C will fail because of an error in line 2.CCompilation of class C will fail because of an error in line 6.DCompilation of class AImpl will fail because of an error in line 2.
问题:单选题Given: Which regular expression, inserted at line 12, correctly splits test into "Test A", "Test B", and "Test C"?()AString regex="";BString regex=" .";CString regex=".*";DString regex="//s";EString regex="//.//s*";FString regex="//w[/.]+";
问题:多选题A developer is creating a class Book, that needs to access class Paper. The Paper class is deployed in a JAR named myLib.jar. Which three, taken independently, will allow the developer to use the Paper class while compiling the Book class?()AThe JAR file is located at $JAVA_HOME/jre/classes/myLib.jar.BThe JAR file is located at $JAVA_HOME/jre/lib/ext/myLib.jar..CThe JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar/Paper.class.DThe JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar.EThe JAR file is located at /foo/myLib.jar and the Book class is compiled using javac -cp /foo/myLib.jar/Paper Book.java.FThe JAR file is located at /foo/myLib.jar and the Book class is compiled using javac -d /foo/myLib.jar Book.javaGThe JAR file is located at /foo/myLib.jar and the Book class is compiled using javac -classpath /foo/myLib.jar Book.java
问题:单选题Given: What is the result?()AThe code runs with no output.BAn exception is thrown at runtime.CCompilation fails because of an error in line 20.DCompilation fails because of an error in line 21.ECompilation fails because of an error in line 23.FCompilation fails because of an error in line 25.
问题:单选题A company that makes Computer Assisted Design (CAD) software has, within its application, some utility classes that are used to perform 3D rendering tasks. The company's chief scientist has just improved the performance of one of the utility classes' key rendering algorithms, and has assigned a programmer to replace the old algorithm with the new algorithm. When the programmer begins researching the utility classes, she is happy to discover that the algorithm to be replaced exists in only one class. The programmer reviews that class's API, and replaces the old algorithm with the new algorithm, being careful that her changes adhere strictly to the class's API. Once testing has begun, the programmer discovers that other classes that use the class she changed are no longer working properly. What design flaw is most likely the cause of these new bugs?()A InheritanceB Tight couplingC Low cohesionD High cohesionE Loose couplingF Object immutability
问题:单选题Given: What is the result when method testIfA is invoked?()ATrueBNot trueCAn exception is thrown at runtime.DCompilation fails because of an error at line 12.ECompilation fails because of an error at line 19.
问题:单选题A team of programmers is involved in reviewing a proposed design for a new utility class. After some discussion, they realize that the current design allows other classes to access methods in the utility class that should be accessible only to methods within the utility class itself. What design issue has the team discovered?()A Tight couplingB Low cohesionC High cohesionD Loose couplingE Weak encapsulationF Strong encapsulation
问题:多选题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 */ }
问题:单选题A programmer has an algorithm that requires a java.util.List that provides an efficient implementation of add(0, object), but does NOT need to support quick random access. What supports these requirements?()A java.util.QueueB java.util.ArrayListC java.util.LinearListD java.util.LinkedList
问题:单选题Given: What is the result?()A2B24C234D246E2346FCompilation fails.
问题:单选题Click the Exhibit button. What is the output if the main( ) method is run?()A4B5C8D9ECompilation fails.FAn exception is thrown at runtime.GIt is impossible to determine for certain.
问题:多选题Given: Which two code fragments, inserted independently at line 13, will compile?()Asuper(name, baseSalary);Bthis.commission = commission;Csuper();this.commission = commission;Dthis.commission = commission;super();E super(name, baseSalary);this.commission = commission;Fthis.commission = commission;super(name, baseSalary);Gsuper(name, baseSalary, commission);
问题:单选题Given: When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?()ALine 5BLine 6CLine 7DLine 8ELine 9FLine 10
问题:单选题Given classes defined in two different files: What is required at line 5 in class SomeApp to use the process method of BitUtils?()Aprocess(bytes);BBitUtils.process(bytes);Capp.BitUtils.process(bytes);Dutil.BitUtils.process(bytes);Eimport util.BitUtils.*; process(bytes);FSomeApp cannot use the process method in BitUtils.