Infosys interview question

normal java questions