问题:多选题Given: Which two statements are true?()AThe output could be 8-1 7-2 8-2 7-1BThe output could be 7-1 7-2 8-1 6-1CThe output could be 8-1 7-1 7-2 8-2DThe output could be 8-1 8-2 7-1 7-2...
查看答案
问题:单选题Given: What is the result?()A 5,6B 5,5C 6,5D 6,6...
问题:单选题Which Man clsss properly represents the relationship "Man has a best friend who is a Dog"?()A class Man extends Dog { }B class Man implements Dog { }C class Man { private BestFriend dog; }D class Man { private Dog bestFriend; }E class Man { private Dog...
问题:单选题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...
问题:单选题Which can appropriately be thrown by a programmer using Java SE technology to create a desktop application?()A ClassCastExceptionB NullPointerExceptionC NoClassDefFoundErrorD NumberFormatExceptionE ArrayIndexOutOfBoundsException...
问题:单选题Given: What is the result?()A Compilation fails.B An exception is thrown at runtime.C The code executes normally and prints "sleep".D The code executes normally, but nothing is printed....
问题:单选题Given the following six method names: add Listener add Mouse Listener set Mouse Listener delete Mouse Listener remove Mouse Listener register Mouse Listener How many of these method names follow JavaBean Listener naming rules?()A 1B 2C 3D 4...
问题:多选题Click the Exhibit button. What two must the programmer do to correct the compilation errors?()Ainsert a call to this() in the Car constructorBinsert a call to this() in the MeGo constructorCinsert a call to super() in the MeGo constructorDinsert a cal...
问题:单选题Given: What is the result?()A r, t, t,B r, e, o,C Compilation fails.D An exception is thrown at runtime....
问题:单选题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....
问题:单选题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...
问题:单选题Given: Which code, inserted at line 16, will cause a java.lang.ClassCastException?()A Alpha a = x;B Foo f = (Delta)x;C Foo f = (Alpha)x;D Beta b = (Beta)(Alpha)x;...
问题:多选题Which three will compile and run without exception?()Aprivate synchronized Object o;Bvoid go() {synchronized() { /* code here */ }Cpublic synchronized void go() { /* code here */ }Dprivate synchronized(this) void go() { /* code here */ }Evoid go() {syn...
问题:多选题Given: Which three are true?()ACat is-a AnimalBCat is-a JumperCDog is-a AnimalDDog is-a JumperECat has-a AnimalFBeagle has-a Tail...
问题:多选题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 StringBufferInput...
问题:单选题Given: Which line of code marks the earliest point that an object referenced by intObj becomes a candidate for garbage collection?()A Line 16B Line 17C Line 18D Line 19...
问题:单选题A company that makes Computer Assisted Design (CAD) software has, within its application, some utilityclasses that are used to perform 3D rendering tasks. The company’s chief scientist has just improved theperformance of one of the utility classes’ key...