Infosys interview question

Basic questions of Java