Infosys interview question

they give snnippet of java code