-------------- Naveen Vooka www.devsquare.com DevSquare - Online Application Development
Joined: Jan 29, 2003
I think those links are trying to sell you something ... a framework that makes Java simulate multiple inheritance. They rendered so poorly on Firefox that I didn't try very hard to figure it out.
Dynamic dispatch is the fundamental language feature that enables runtime polymorphism. When I code a method call on a variable declared as an interface there is no code present at compile time to be called. At runtime the JVM routes the call to the actual class of the object referenced by the variable.
List books = getBooks(); System.out.println(books.size());
List promises that a method size() exists but doesn't implement it. Some concrete class like LinkedList implements it and the JVM does "dynamic dispatch" to the concrete method.