smuggledPancakes smuggledPancakes - 1 year ago 141
Java Question

Does Java have mutable types for Integer, Float, Double, Long?

I am in a situation where I want to use mutable versions of things like Integer. Do I have to use these classes (below) or does Java have something built in?

Answer Source

No, java doesn't have these built in. And that is for a reason. Using mutable types is dangerous as they can easily be misused. plus it is really easy to implement it. (commons-lang has MutableInt for example)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download