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.


b. buffer has capacity 31.

Computer Science & Information Technology

You might also like to view...

Select the syntactically correct way to access a Public Shared class member.

a) className(sharedMemberName) b) sharedMemberName.className c) className.sharedMemberName d) sharedMemberName(className)

Computer Science & Information Technology

How can you make a script executable?

What will be an ideal response?

Computer Science & Information Technology

What is the output of the following program?

``` count = 5; while (count > 0) { print(“Woot! ”); count -= 1; } ```

Computer Science & Information Technology

Each ________ and control on a form has properties

Fill in the blank(s) with correct word

Computer Science & Information Technology