adspace
Answer Posted / Ravi Ranjan
To make a class immutable in Java, make its fields final (to ensure they cannot be modified), ensure the constructor is private, and provide factory methods for creating instances.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers