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 overloading in java?

Answer Posted / rajesh bonepalli

Overloading in java means creating the methods by same
method signature(name,return type) passing different
arguments/parameters.

Example :
public class Children {
public void getHabits(int k){
System.out.println("overriding in the children with
childrens behaviour int");
}
public void getHabits(){
System.out.println("overriding in the children with
childrens behaviour");
}
public void getHabits(double j){
System.out.println("overriding in the children with
childrens behaviour double");
}
public String getHabits(double j,double i){
System.out.println("overriding in the children with
childrens behaviour double");
return null;
}

}

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is files manifesting?

2151


What are the differences between checked exception and unchecked exception?

933


Can we modify the throws clause of the superclass method while overriding it in the subclass?

1001


Give any two differences between C++ and java.

1093


What does yield method of the thread class do?

981


What does exp mean in math?

941


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

2115


Why string is called as immutable?

895


What is a “stateless” protocol ?

944


How do you insert a line break?

859


Is Constructor possible in abstract class in java ?

996


what is an objects lock and which objects have locks? : Java thread

955


How to sort an array from smallest to largest java?

951


Why do we need wrapper classes?

1024


What are decalarations?

1067