• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

replacement and refinement

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai,
what is the meaning of replacement and refinement.

replacement and refinement are also called as overloading and overriding is it correct,please clear this.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actual Question:

hai,
what is the meaning of replacement and refinement.

replacement and refinement are also called as overloading and overriding is it correct,please clear this.

Hi Ramchander,

You are completely mistaken. Replacement & Refinement are not equal to Overloading and Overriding respectively.
Infact both are types of Overriding only i.e comes in inheritance.
Replacement meand a derived class defines a new method whose signature is exacltly similar to the base class method i.e it replaces the base class body with a new one hence the name.
where as, refinement preserves the body of the base method, and enhances(adds some more code)the base method i.e it refines the base class method hence the name.
In summary, in Replacement base method code is hidden by the derived code, where as in Refinement base method body is enhanced by preserving it.
In general, in both languages C++ & java default it is Replacement.

hope this helps.

-prakash
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic