|
Java™ by example!
|
|
|
What is the difference between mutable and immutable classes?
Difference between the classes i think is that you can't change behaviour in the immutable class. You can't sublcass it and make it do more functionality as you can do with mutable classes. Take a look at the String class for example it's immutable. It's defined as final. If you try to subclass it you will get an error.
Further Information
Author of answer: Val
Comments
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|