Divya
SCJP1.6
Divya Chandel wrote:
When we compile the class, the compiler binds the appropriate method to the object based on the method’s arguments.
Divya Chandel wrote:
Overloading is the example of compile-time polymorphism.
,here i have one question, does object exist(create) at compilation time of java code?
Campbell Ritchie wrote:You will find no agreement; if you ask a lot of people, many will say there is only runtime polymorphism, and compile‑time polymorphism is a misnomer.
Campbell Ritchie wrote:
if you ask a lot of people, many will say there is only runtime polymorphism,
Tony Docherty wrote:
No, objects only exist at runtime.
I can't answer your second question because I'm sorry but I don't understand it.
Vivek Bhardwaj wrote:but if it is true that there is only runtime polymorphism exist...then i'd be eager to know about the point- 3 mentioned above. ?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
Vivek Bhardwaj wrote:but if it is true that there is only runtime polymorphism exist...then i'd be eager to know about the point- 3 mentioned above. ?
My opinion: it doesn't exist. It is simply a term coined by some (probably lazy) technical writers to describe method overloading in terms that "everyone" (?) understands.
As far as I'm concerned "static [or 'compile time'] polymorphism" is an oxymoron.
Winston
Don't get me started about those stupid light bulbs. |