Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between quicksort & mergesort? When should they be used? What is their running time?

1085


What is java abstraction with example?

1058


Why static functions are used?

1093


How does class forname work in java?

961


Explain some best practices you would apply while using collection in java?

1028


How many bytes is a url?

976


What does sprintf mean?

943


What is the char data type?

993


What is meant by object oriented programming – oop?

983


How can an exception be thrown manually by a programmer?

989


Explain the reason behind ending a program with a system.exit(0)?

1079


What is stringbuffer in java?

1056


What does int argc char * argv [] mean?

991


Difference between object instantiation and construction ?

1057


Define an enumeration?

1035