Forums Java Help What is difference between overloading and overriding

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7159
    Aakanksha
    Participant

    What is difference between overloading and overriding?

    #11851
    Aakanksha
    Participant

    a) In overloading, there is a relationship between methods available in the same class whereas in overriding, there is relationship between a superclass method and subclass method.

    b) Overloading does not block inheritance from the superclass whereas overriding blocks inheritance from the superclass.

    c) In overloading, separate methods share the same name whereas in overriding, subclass method replaces the superclass.

    d) Overloading must have different method signatures whereas overriding must have same signature.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.