What happens when you increase a StringBuilder object's length to be longer than the string it holds?? What happens if you set the length of a string to be shorter than the string it contains?

What will be an ideal response?


?When you increase a StringBuilder object's length to be longer than the String it holds, the extra characters contain ‘\u0000'. If you use the
setLength() method to specify a length shorter than its String, the string is truncated.

Computer Science & Information Technology

You might also like to view...

Not all algorithms require a processing item.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Click ____ to move a stacked object to the top of the stack.

A. Move to Top B. Bring to Front C. Slide to Top D. Move to Front

Computer Science & Information Technology

In addition to being available online, members can register for fitness classes through the mail or by dropping off a mail-in form. Follow the guidelines and suggestions in this chapter, and design a paper source document.

What will be an ideal response?

Computer Science & Information Technology

Which of the following is a segment of memory or storage, such as the disk in the accompanying figure, in which items are placed while waiting to be transferred from an input device or to an output device?

A. index B. process C. throttle D. buffer

Computer Science & Information Technology