Loading
Runtime polymorphism

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  What is Runtime polymorphism ?


Ans)

"Runtime time polymorphism" is done using inheritance and virtual functions, this is also called "Function Overriding". For example we could override the functionality of any method of Super Class by having different implementation is subclass. See the example below "Shape.draw()" is overridden in "Reactangle.draw()" class. So please note with out "inheritance" overriding would not be possible.  

public Class Shape {
   public void draw () {
   }
 }
 public Class Rectangle extends Shape {
   public void draw () {
      //Different Implementation here.  
  }
 }



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Runtime polymorphism


Runtime polymorphism

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free