Java polymorphism basics
<p>I am reading the SCJP book by Kathy Sierra. Polymorphism is little confusing. Could you please help me out with a real world example for the following: I understood that Polymorphism only works when you have overridden methods no matter if you do it via class or interface and on runtime JVM determines the method based on Object type.
<br/>Lets say Horse extends from Animal and it also overrides the eat() method.
What is the benefit of doing:  <code>Animal a = new Horse();
a.eat();</code> over <code>Horse b = new Horse();
b.eat();</code> <br/> Eventually the result is going to be the same. I apologize its a very basic question but even all the senior developers in my team gave me all different answers.</p>
