Pergunta de entrevista da empresa Tata Consultancy Services

Basic question regarding java and it was not much very difficult