Entain India interview question

implement immutable class