Capgemini interview question

immutable class working