what is overloading and overriding?

Answer Posted / dinesh

OVERLOADING:Two methods are having same name and different arguments in same class
OVERRIDING: Two methods are having same name and same arguments also same return types in its class and sub class (from 1.5 on words co-varient return types also allowed this is applicable for only for object types not primitives)i.e some relation either parent to child or child to parent

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism in oops with example?

766


Why do we use class in oops?

744


What is destructor give example?

811


Why do we need oop?

871


why reinterpret cast is considered dangerous?

2108


Can a varargs method be overloaded?

812


What is encapsulation in simple terms?

766


What is class and example?

817


What is solid in oops?

807


Is enum a class?

795


What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2309


#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

2321


What is encapsulation in ict?

808


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?

1619


What does sksksk mean in text slang?

1837