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...

What is the Difference between Overriding and overloading?

Answer Posted / kundan kumar

OverLoading : All the method will share the same name but
it differes based on the parameter, type of parameter and
number of parameter

OVERRIDING:-
it just in inheritance and the overriding
method must hold the same name and the same signatures .
the change maybe just in behavior .


The Dog class in the following example is the subclass and
the Animal class is the superclass. The Cat class overrides
eat() method inherited from Animal class.

public class Animal {

public void eat() {
System.out.println("Eat for Animal");
}
}

public class Dog extends Animal {

public void eat() {
System.out.println("Eat for Dog");
}
}

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are jagged arrarys ?

1030


What is static member?

1051


What is code security?

1128


What are the different types of a stream?

1062


What is the difference between system.applicationexception class and system.systemexception?

1185


what is difference between web.config and machine.config and where it will be ?

989


Which class allows an element to be accessed using unique key?

1009


What is a stream in vb.net?

1056


What is globalization?

1037


What is jagged array in vb.net?

1144


Explain internal keyword in .net framework?

1019


What is misl code?

1180


What are the shadow variables?

1107


Explain the difference between value and reference types?

948


Can you please explain the difference between dataset and datareader?

1083