A.When using versions of Java technology earlier than 5.0.
B.When sharing a StringBuffer among multiple threads.
C.When using the java.io class StringBufferInputStream.
D.When you plan to reuse the StringBuffer to build more than one string.
您可能感兴趣的试卷
你可能感兴趣的试题
Click the Exhibit button. What is the result? ()
A.Value is: 8
B.Compilation fails.
C.Value is: 12
D.Value is: -12
E.The code runs with no output.
F.An exception is thrown at runtime.
Given:
Which three are true?()
A.Cat is-a Animal
B.Cat is-a Jumper
C.Dog is-a Animal
D.Dog is-a Jumper
E.Cat has-a Animal
F.Beagle has-a Tail
G.Beagle has-a Jumper
Given:
Which two are true? ()
A.The output is mm.
B.The output is mc.
C.Component is-a Meter.
D.Component has-a Meter.
E.DeluxeThingy is-a Component.
F.DeluxeThingy has-a Component.
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 coupling
B.Low cohesion
C.High cohesion
D.Loose coupling
E.Weak encapsulation
F.Strong encapsulation
Click the Exhibit button. What two must the programmer do to correct the compilation errors? ()
A.insert a call to this() in the Car constructor
B.insert a call to this() in the MeGo constructor
C.insert a call to super() in the MeGo constructor
D.insert a call to super(vin) in the MeGo constructor
E.change the wheelCount variable in Car to protected
F.change line 3 in the MeGo class to super.wheelCount = 3;
Given:
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:
What is the result?()
A.The code runs with no output.
B.An exception is thrown at runtime.
C.Compilation fails because of an error in line 20.
D.Compilation fails because of an error in line 21.
E.Compilation fails because of an error in line 23.
F.Compilation fails because of an error in line 25.
A.A final method in class X can be abstract if and only if X is abstract.
B.A protected method in class X can be overridden by any subclass of X.
C.A private static method can be called only within other static methods in class X.
D.A non-static public final method in class X can be overridden in any subclass of X.
E.A public static method in class X can be called by a subclass of X without explicitly referencing the class X.
F. A method with the same signature as a private final method in class X can be implemented in a subclass of X.
G. A protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.
Given:
Which three are valid?()
A.p0 = p1;
B.p1 = p2;
C.p2 = p4;
D.p2 = (ClassC)p1;
E.p1 = (ClassB)p3;
F.p2 = (ClassC)p4;
Given:
What is the result?()
A.Canada
B.null Canada
C.Canada null
D.Canada Canada
E.Compilation fails due to an error on line 26.
F.Compilation fails due to an error on line 29.
最新试题
Which three statements are true?()
Given:Which two are true? ()
DRAG DROP Click the Task button.
Given:What is the result?()
Given:What is the result?()
DRAG DROP Click the Task button.
Click the Exhibit button. What is the result? ()
DRAG DROP Click the Task button.
Which two scenarios are NOT safe to replace a StringBuffer object with a StringBuilder object?()
Given:What is the result?()