This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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

Win a copy of Elasticsearch in Action this week in the Big Data forum!
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: 41098
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.
It is sorta covered in the JavaRanch Style Guide.
subject: compile time polymorphism