The moose likes Beginning Java and the fly likes compile time polymorphism Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "compile time polymorphism " Watch "compile time polymorphism " New topic

compile time polymorphism

suavedeep kaur
Ranch Hand

Joined: Jun 02, 2008
Posts: 36
does compile time polymorphism occurs in java???

if so when and how???

Suavedeep kaur
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46375
That is a good question. . .

I don't like the term compile-time polymorphism. You can use runtime binding (polymorphism) with instance methods. Static members and fields, if called, are bound to their declaring class at compile-time, but lots of people here post how much they get confused when that happens, so it is probably best to say there is no such thing as compile-time polymorphism in Java. But I am sure other people will have a different opinion.
Look at this FAQ, which is relevant.
I agree. Here's the link:
subject: compile time polymorphism
It's not a secret anymore!