Are all final classes in Java immutable. String and Integer both are final classes and both are immutable i beleive.
No, final means the class can not be extended. It says nothing about mutability. For example:
final class MutInt {
public int modifyMe;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With