Pregunta de entrevista de Infosys

Java based question