Capgemini interview question

java technical