0 votes
in JAVA by (19.9k points)

Which of the following is a mutable class in java?

a) java.lang.String

b) java.lang.Byte

c) java.lang.Short

d) java.lang.StringBuilder

1 Answer

0 votes
by (19.9k points)

(d) java.lang.StringBuilder

Reason: A mutable class is a class in which changes can be made after its creation. We can modify the internal state and fields of a mutable class. The StringBuilder class is a mutable class, as it can be altered after it is created.

The String, Byte, and Short are immutable classes as they cannot be altered once they are created.

Related questions

...