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
Can you access non static variable in static context?
What is the properties class?
What is yield () in java?
What do you understand by the bean persistent property?
Explain when noclassdeffounderror will be raised ?
What is computer compiler?
What is protected in java?
What is the Difference between Final Class && Abstract Class?
What are benefits of java?
Is null function in java?
What is an exception? difference between Checked and Unchecked exception in Java
What is the byte range?
What is native method in java?
What is %02d?
How to run a JAR file through command prompt?