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
Why char array is favored over string for the storage of passwords?
Write a program to calculate factorial in java?
Can we override singleton class?
Can we inherit a class with private constructor?
What is a treeset in java?
What are the types of arrays in java?
How do you create immutable object in java?
Why do we use return statement?
How to sort a collection of custom Objects in Java?
Tell us something about an iterator.
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
How much ram can a 64 bit processor theoretically?
What is encapsulation in java?
How to print nodes of a Binary tree?
How do you get the length of a string in java?