Multiple choice

Pick out what is true from the following options? i. Object instantiated from String Buffer is thread-safe. ii. Object instantiated from String Builder is thread-safe. iii. String Buffer has high and fast performance. iv. String Builder has high and fast performance.

  1. i. and iii. are true.

  2. i. and iv. are true

  3. ii. and iii. are true.

  4. ii. and iv. are true.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This answer is correct. String Buffer is synchronized or thread-safe and String Builder has higher performance compared to String Buffer.