what is overloading in java?

Answer Posted / vijayakumar chinnasamy

Method overloading:
More than one method have same name but different type
of argument or differnt no. of arguments available in same
class or it subclass is called overloading.

Return type of method and access specifier of method is
not a problem in method overloading.

class A{
void diaplay(int a,int b){ }
void display(float a,float b){ }
void display(float a, int b){ }
void display(int a,int b){
void display(){ }

}

Is This Answer Correct ?    46 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if constructor is private?

810


What does this () mean in constructor chaining concept?

843


Describe the process as to how substring() methodology mechanisms in java.

804


When is the garbage collection used in Java?

918


Explain what are final variable in java?

820


What are untrusted applets?

853


What is the use of set in java?

874


What are abstract methods in java?

908


What is a void in java?

808


Can an interface implement another interface?

810


Can I declare class as static or private?

768


can rmi and corba based applications interact ?

871


How do generics work?

728


What is boolean used for?

816


What is a databasemetadata?

739