Infosys interview question

Object oriented programming basic question