Originally posted by Jay Dilla:
...ah.eat; ...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by marc weber:
This references a field. Do you mean to call a method, for example, ah.eat();?
Originally posted by marc weber:
Can you post the code for Animal and Horse?
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Mr. C Lamont Gilbert:
I think method 'binding' is done at compile time. Object binding is done at runtime. So at compile time the compiler knows what method it is calling, it just does not know on which object since objects do not exist at compile time.
I hope my terms are correct...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by Mr. C Lamont Gilbert:
My cast do not give the compiler anymore information about runtime type than it already had. Which is none...
Originally posted by Mr. C Lamont Gilbert:
... The choice to call AClass, BClass, or CClass's method definitions is called 'binding.'
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by marc weber:
Explicit casts give the compiler your assurance that the runtime type will be what you indicate. Without this information, the code would not compile (if downcasting is required). Of course, the JVM can't know until runtime whether this information is correct, and a runtime exception will be thrown if the information turns out to be wrong.
Originally posted by marc weber:
Yes, and this is dynamic (runtime) binding. The question seems to be whether selecting a method call at compile time (based on argument types) constitutes "binding" (for non-final instance methods), and I don't think this falls under the definitions I've seen.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Originally posted by Mr. C Lamont Gilbert:
... The compiler couldn't care less about runtime types...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org