This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

compile time polymorphism  RSS feed

 
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
Marshal
Posts: 55698
163
  • 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
Boost this thread!