Infosys interview question

oops questions basic programming basic