Infosys interview question

Java OOPs concepts