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 is whitespace important?
Differentiate between a class and an object.
What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?
What is scope & storage allocation of static, local and register variables? Explain with an example.
Which method returns the length of a string?
What is the maximum length of a url?
Is null an object java?
Which api is provided by java for operations on set of objects?
What is stringreader?
What is the difference between inheritance and encapsulation?
How do I get 64 bit java?
Can we able to pass objects as an arguments in java?
What is number data type?
What is the major drawback of internal iteration over external iteration?
Can you access non static variable in static context?