what is overloading and overriding?

Answer Posted / nishanthi

Overriding - same method names with same arguments and same
return types associated in a class and its subclass.

Overloading - same method name with different arguments,
may or may not be same return type written in the same
class itself.

Is This Answer Correct ?    24 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2360


Why it is called runtime polymorphism?

778


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1886


What polymorphism means?

804


What is the difference between procedural programming and oops?

762


what is different between oops and c++

2180


What are different oops concepts?

767


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

2195


What is inheritance and how many types of inheritance?

805


What is a function in oop?

816


What is static in oop?

820


Where is pseudocode used?

727


officer say me - i am offered to a smoking , then what can you say

1830


Please send ford technologies placement paper 2 my mail id

1836


What are the two different types of polymorphism?

874