Difference between Overloading and Overriding?
Answer Posted / janet
1. In overloading,there is a relation ship between methods
available in the same class where as in overridding,there
is relationship between a super class method and subclass
method.
2. overloading doesn't block inheritence from the
superclass where as overridding blocks inheritence.
3. in overloading,seperate methods share the same name
where as in overridding,subclass methods replaces the
superclass.
4.overloading must have different method signatures where
as overriding must have same signature.
Is This Answer Correct ? | 482 Yes | 79 No |
Post New Answer View All Answers
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
What is the array and initializing arrays in c++?
What is difference between array and vector in c++?
What is math h in c++?
how can i access a direct (absolute, not the offset) memory
address?
here is what i tried:
wrote a program that ask's for an address from the user,
creates a FAR pointer to that adress and shows it. then the
user can increment/decrement the value in that address by
pressing p(inc+) and m(dec-).
NOW, i compiled that program and opened it twice (in 2
different windows) and gave twice the same address to it.
now look what happen - if i change the value in
one "window" of the program, it DOES NOT change in the
other! even if they point to the same address in the memory!
here is the code snippet:
//------------------------------------------------------
#include Why do we use structure in c++? What is the difference between public, private, and protected access? Write a program in C++ for Fibonacci series Why c++ does not have finally? Does a derived class inherit or doesn't inherit? Does c++ have arraylist? Should the member functions which are made public in the base class be hidden? Is map ordered c++? Can we make any program in c++ without using any header file and what is the shortest program in c++. What are signs of manipulation?