Results 1 to 6 of 6
Thread: what is polymorphism
- 04-02-2008, 08:39 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 11
- Rep Power
- 0
- 04-03-2008, 05:15 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
It's a long story. Did you google it. There are lots of nice tutorials and articles available.
Java Guide - Polymorphism
- 04-03-2008, 05:36 AM #3
Member
- Join Date
- Mar 2008
- Location
- Pune, India
- Posts
- 2
- Rep Power
- 0
Yes its a long story indeed. Since you have a quiz here is brief description about Polymorphism.
There are two types, Static polymorphism ( also called compile time polymorphism) and Dynamic polymorphism (also called run-time polymorphism).
Method overloading is nothing but static polymorphism. Calls to overloaded methods are resolved by the compiler at compile time, hence called static binding.
Dynamic binding usually comes into picture when you have a sub class overriding a method of the super class. In such case if a base class reference is used to call the overridden method, the version of method to be invoked (i.e. the base class version or the child class version) is decided by the JVM, depending on the object the reference is pointing to. This is done at run time and hence called dynamc binding.
Please go through an example for better understanding.
- 04-03-2008, 05:39 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Yep, there is a simple example included in the link I have provided.
- 04-03-2008, 09:01 PM #5
Member
- Join Date
- Nov 2007
- Posts
- 11
- Rep Power
- 0
thanks its was helpful.....i think i did well on this quiz.
but don't know about professor :rolleyes:
i am glad i joined this community.
- 04-04-2008, 03:14 AM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Wish you all the best with your quiz.
Similar Threads
-
Relation between Polymorphism and Inheritance
By janakiram.attuluri in forum Advanced JavaReplies: 1Last Post: 12-26-2007, 11:32 PM -
what's polymorphism?
By christina in forum New To JavaReplies: 2Last Post: 08-05-2007, 10:29 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks