Capgemini interview question

how to make immutable class