Given the following declarations:
StringBuilder buffer = new StringBuilder("Testing Testing") ;
Buffer.setLength(7) ;
Buffer.ensureCapacity(5) ;
Which of the following is true?
A) buffer has capacity 5.
B) buffer has capacity 31.
C) buffer has content "Testin".
D) buffer has length 15.
Correct Answer:
Verified
Q14: Given the following declaration:
StringBuilder buf =
Q15: StringBuilder objects can be used in place
Q16: The statement
s1.startsWith("art")
Has the same result as
Q17: Which of the following statements is true?
A)
Q18: String objects are immutable. This means they
Q20: Which of the following creates the string
Q21: Which of the following statements is true?
A)
Q22: Consider the Java segment:
String line1 =
Q23: Consider the Java segment:
String line1 =
Q24: Which class is not a type-wrapper class?
A)
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents