Pregunta de entrevista de Morgan Stanley

How polymorphism and inheritance work in Java?