This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compile time polymorphism

 
suavedeep kaur
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does compile time polymorphism occurs in java???

if so when and how???
 
Campbell Ritchie
Sheriff
Pie
Posts: 49405
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic