Mutable and immutable objects in java
Mutable objects Immutable objects are like variables. We not modify them once they are created. They are not final in nature. Examples: StringBuffer, StringBuilder, java.util.Date etc. Example class MutableStudent{ private String name; MutableStudent(String name) { this.name = name; } public String getName() { return name; } public void setName(String name) { this.name … Read more