Difference between over loading and over ridding?

Answer Posted / nagababu

Overloading:-Writing Two or three methods with same name
but different parameters in same class,it is called
methodOverloading.

Overriding:-writing same methodname and parameters in
subclass and superclass with same return type,it is called
methodoverriding.

Is This Answer Correct ?    3 Yes 2 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

2392


what type of question are asked in thoughtworks pair programming round ?

1982


What is abstraction and encapsulation?

791


What is purpose of inheritance?

876


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1640


What is new keyword in oops?

804


What is the difference between a constructor and a destructor?

878


Can bst contain duplicates?

963


Explain the concepts involved in Object Oriented programming.

895


What are the features of oop?

853


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

2344


What is class in oop with example?

854


What do you mean by variable?

779


what's the basic's in dot net

1947


What is polymorphism explain its types?

942