To summarize, which overridden version of the method to call (in other words, from which class in the inheritance tree) is decided at runtime based on object type, but which overloaded version of the method to call is based on the reference type of the argument passed at compile time.
- 2 Object Orientation
- from OCA/OCP Java SE 7 Programmer I & II Study Guide (Exams 1Z0-803 & 1Z0-804)
- Publisher: Oracle Press
- Released: October 2014
Difference between overloading and overridden functions.
Share this highlighthttp://www.safaribooksonline.com/a/ocaocp-java-se/78087/