Subscribeobj.eat()might call different overrides each time it's executed depending on the value of obj. In the "same signature" case you are adding a function eat to a new scope. Scoping is static in java. The scope of eat in that same line of code is known at compile time.
private function cannot be overridden by definition, because it is never 'visible'. There are no external calls to override. The keyword that prevents non-private methods from being overridden is final.B b = new D() ;
Invokespecial is used in three situations in which an instance method must be invoked based on the type of the reference, not on the class of the object. The three situations are:
1. invocation of instance initialization () methods
2. invocation of private methods
3. invocation of methods using the super keyword </blockquote
You are not logged in, either login or create an account to post comments
posted by freshgroundpepper at 12:07 AM on May 20, 2006