Infosys Interview Question

they give snnippet of java code