What is the purpose of the 'StringBuilder' class in Java, and how is it different from 'String'? - Study24x7
Social learning Network
14 Mar 2024 12:32 PM study24x7 study24x7

What is the purpose of the 'StringBuilder' class in Java, and how is it different from 'String'?

A

StringBuilder is immutable; String is mutable.

B

StringBuilder is synchronized; String is not synchronized.

C

 StringBuilder is used for string concatenation and is mutable; String is immutable.

D

StringBuilder is used for formatting output; String is used for mathematical operations.

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles