Function overloading vs function overriding
belongs to collection: OOP inheritence and polymorphism in java assisgnment questions
All Answers
total answers (1)
belongs to collection: OOP inheritence and polymorphism in java assisgnment questions
total answers (1)
function overloading:
is happened when we call a function and give it a parameters more than the parameters that it takes, ex: a function x has 1 parameter of type int, if we call it and give it 2 parameters then its overloading, also if we call it and give it 1 parameter of a data type not int then its also an overloading.
Function overriding:
Its when we rewrite the function in the sub class.
need an explanation for this answer? contact us directly to get an explanation for this answer