If immutable objects are good, why do people keep creating mutable objects?

Posted by Vinoth Kumar on Programmers See other posts from Programmers or by Vinoth Kumar
Published on 2012-06-06T07:44:26Z Indexed on 2012/06/06 10:48 UTC
Read the original article Hit count: 298

Filed under:
|
|

If immutable objects are good,simple and offers benefits in concurrent programming why do programmers keep creating mutable objects?

I have four years of experience in Java programming and as I see it, the first thing people do after creating a class is generate getters and setters in the IDE (thus making it mutable). Is there a lack of awareness or can we get away with using mutable objects in most scenarios?

© Programmers or respective owner

Related posts about java

Related posts about object-oriented