Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java General  RSS feed

 
Praveen Ravinuthala
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is polymorphism different from overiding and over loading ?
explain answer with reason ?
 
dennis deems
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Overriding is how polymorphism happens. You can't have overriding without inheritance. You can have overloading with or without inheritance -- it's completely distinct.
 
Winston Gutkowski
Bartender
Posts: 10573
65
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Praveen Rvs wrote:is polymorphism different from overiding and over loading ?

You will sometimes hear overloading referred to as 'static polymorphism', which in my view is not only an oxymoron, it's misleading (and is probably responsible for many questions like this - yours isn't the first ).

Like Dennis said: polymorphism is all about overriding.

Winston
 
Campbell Ritchie
Marshal
Posts: 55751
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!