Domanda di colloquio di Tata Consultancy Services

Java polymorphism question