站内搜索
1z0-851 问题列表
问题 单选题Given: What is the result?()A CanadaB null CanadaC Canada nullD Canada CanadaE Compilation fails due to an error on line 26.F Compilation fails due to an error on line 29.

问题 单选题Given: Which code, inserted at line 15, creates an instance of the Point class defined in Line?()A Point p = new Point();B Line.Point p = new Line.Point();C The Point class cannot be instatiated at line 15.D Line l = new Line() ; l.Point p = new l.Point();

问题 单选题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: What is the result?()A Compilation fails.B An exception is thrown at runtime.C [608, 609, 610, 612] [608, 610]D [608, 609, 610, 612] [608, 609, 610]E [606, 608, 609, 610, 612] [608, 610]F [606, 608, 609, 610, 612] [608, 609, 610]

问题 单选题Given: What is the result?()A nullB finallyC null finallyD Compilation fails.E finally exception

问题 单选题Given: What is the result?()A Compilation fails because of an error in line 7.B Compilation fails because of an error in line 9.C If you define D e = new E(), then e.bMethod() invokes the version of bMethod() defined in Line 5.D If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 5.E If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 9.

问题 单选题Given: What is the result?()A w-fB f-p w-fC w-f b-fD f-p w-f b-fE Compilation fails.F An exception is thrown at runtime.

问题 多选题Which two scenarios are NOT safe to replace a StringBuffer object with a StringBuilder object?()AWhen using versions of Java technology earlier than 5.0.BWhen sharing a StringBuffer among multiple threads.CWhen using the java.io class StringBufferInputStream.DWhen you plan to reuse the StringBuffer to build more than one string.

问题 多选题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

问题 多选题Which two scenarios are NOT safe to replace a StringBuffer object with a StringBuilder object?()AWhen using versions of Java technology earlier than 5.0.BWhen sharing a StringBuffer among multiple threads.CWhen using the java.io class StringBufferInputStream.DWhen you plan to reuse the StringBuffer to build more than one string.

问题 单选题Given: What is the result?()A 2B 3C 12D 23E 123F Compilation fails.G An exception is thrown at runtime.

问题 单选题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: When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?()A Line 5B Line 6C Line 7D Line 8E Line 9F Line 10

问题 单选题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?()A peepB barkC meowD Compilation fails.E An exception is thrown at runtime.