Pergunta de entrevista da empresa HCLTech

Java core usual question and 2 problems