Pergunta de entrevista da empresa Morgan Stanley

How polymorphism and inheritance work in Java?