Pregunta de entrevista de Infosys

they give snnippet of java code