Results 1 to 6 of 6
  1. #1
    Nari is offline Member
    Join Date
    Nov 2007
    Posts
    11
    Rep Power
    0

    Question what is polymorphism

    hi
    can anyone tell me little bit about polymorphism, early binding and late binding.
    I have quiz tomorrow morning.:eek:

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  3. #3
    Musten is offline Member
    Join Date
    Mar 2008
    Location
    Pune, India
    Posts
    2
    Rep Power
    0

    Default

    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.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  5. #5
    Nari is offline Member
    Join Date
    Nov 2007
    Posts
    11
    Rep Power
    0

    Default

    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.

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. Relation between Polymorphism and Inheritance
    By janakiram.attuluri in forum Advanced Java
    Replies: 1
    Last Post: 12-26-2007, 11:32 PM
  2. what's polymorphism?
    By christina in forum New To Java
    Replies: 2
    Last Post: 08-05-2007, 10:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •