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

Can a main method be overloaded?

965


What are the methods used to implement for the key object in the hash map?

983


What happens if an exception is not handled in a program?

1045


What is a ternary operator in java? What is an interface?

942


What is the difference between state-based unit testing and interaction-based unit testing?

883


Why is singleton instance static?

945


What is the association?

928


Is it possible to compare various strings with the help of == operator?

924


Is space a character in java?

960


What are the benefits of operations in java?

943


What is meant by binding in rmi?

956


When we serialize an object does the serialization mechanism saves its references too?

970


Explain jvm, jre, and jdk?

956


What is java in detail?

1023


What is the difference between an argument and a parameter?

949