• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

what is polymorphic arguments ???

 
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have googled but didnt find what i m looking for , so please any one here can me explain what is polymorphic arguments with a simple sample program
thanks for those who tried
 
Marshal
Posts: 70318
283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never heard of them. Are you sure you have the right phrase?
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Polymorphism is an OO-programming concept, where the programmer has the ability to handle related derived types with a base class type. If my argument's type is a base class, then the object can be any derived type and I can call any method inherited from that base class. If the object's type has overridden the inherited method, that version should be invoked.



drawShape's argument is polymorphic, it can operate on many types (Rectangle and Circle) and invoke the correct function (if it's overridden).
    Bookmark Topic Watch Topic
  • New Topic