Java   View all facts   Glossary   Help
mechanism > method name overloading
Next mechanismmultithreading    Upmechanism    Previous mechanisminheritance   

method name overloading comparison table
Subject make is a kind of is a synonym of is a subtopic of have example consider has definition
mechanism kbTop     
method name overloadingit possible for methods to behave differently depending on the arguments they receivemechanismmethod overloadingMethods
// Two methods have the same name and the same number of parameters
// but different parameter types

public String eats(Cat aCat) {
return "mice";
}

public String eats(Dog aDog) {
return "bones";
}
the return type when differentiating between overloaded methodsA mechanism that allows several methods to have the same name as long as they have different method signatures

Next mechanismmultithreading    Upmechanism    Previous mechanisminheritance