Pregunta de entrevista de Infosys

Question was on Java programming