Difference between overloading and Overriding. <Giving a
confusing example to test the concept.>
(also asked in PA Consultancy Group,iflex,Value
chain,IBM,CTS,Accenture, Tarang>
Answer Posted / priyanka patil
Function Overloading
class A
{
int show(int a,float b)
float show(int a,int b)//different prototype can valid but
as per parameters they called
}
Function overriding
class A
{
int show(int a)
};
class B : public A
{
int show(int a)//function prototype of base class fun n
derived class function must be same
}
| Is This Answer Correct ? | 26 Yes | 8 No |
Post New Answer View All Answers
How do you sort a set in java?
What are heap memory and stack memory and what are memory tables.
What checkbox method allows you to tell if a checkbox is checked?
What is the purpose of the system class in java?
Are maps ordered java?
What is an immutable class?
Where can I find jdk in my computer?
What is the difference between the final method and abstract method?
What is the size of integer?
What is string [] java?
Why use string handling in Java?
What is string english?
What are the advantages of exception handling in java?
What is concurrent hashmap and its features?
What are passing parameters?