Capgemini interview question

core java