Infosys interview question

basic questions in java