Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

If you know you will need to increase the capacity of a StringBuilder object mul

ID: 3740606 • Letter: I

Question

If you know you will need to increase the capacity of a StringBuilder object multiple times in a program, it's best to set the initial capacity _____.

high

very precisely

low

to an empty string

You are comparing two String variables, t1 and t2. Which statement is equivalent to the one below?  

t1.regionMatches(true, 0, s4, 0, t2.length());

t1.regionMatches(false, t2, 0, t1.length);

t1.regionMatches(0, t2.length());

t1.equalsIgnoreCase(t2);

t1.compareTo(t2.length);

Interface [answer] describes methods for writing primitive types to an output stream.

high

very precisely

low

to an empty string

Explanation / Answer

ANSWER 1: Here option(D) will be correct.we should set the initial capacity null for string builder object.

ANSWER 2: For comparing two strings are like t1 and t2. here t1.regionMatches(true, 0, s4, 0, t2.length());? will be equal to t1.equalsIgnoreCase(t2); So option (C) is correct.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote