Pergunta de entrevista da empresa Capgemini

Java and oops based question