make immutable class
Anonymous
To create immutable class in java, you have to do following steps. 1. Declare the class as final so it can't be extended. 2. Make all fields private so that direct access is not allowed. 3. Make all mutable fields final so that it's value can be assigned only once.
Check out your Company Bowl for anonymous work chats.