Infosys interview question

basic java questions