Infosys interview question

Inheritance in java