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
Difference between method overloading and method overriding in java ?
How we can run a jar file through command prompt in java?
What is main in java?
How to make a non daemon thread as daemon?
What is the purpose of using the java bean?
Why for each loop is used?
Explain about data types?
What is void keyword?
Why there is no call by reference in java?
What is class forname used for?
Is vector thread safe in java?
Explain the init method?
Can a class be final?
What is difference between array and vector?
What are the drawbacks for singleton class?