Sobes.tech
Junior — Middle

Can a wrapper class be considered a mutable data type?

sobes.tech AI

Answer from AI

A wrapper class in Java, such as Integer, Double, Boolean, etc., represents an immutable data type. This means that once an object is created, its internal value cannot be changed. If the value needs to be changed, a new object is created. Therefore, a wrapper class cannot be considered a mutable data type.