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
What is the purpose of javac exe?
Where are register variables stored?
Differentiate between run time error and syntax error.
When is the arraystoreexception thrown?
What is the significance of java packages?
Write a code to create a trigger to call a stored procedure
What is return data type?
Explain java coding standards for classes or java coding conventions for classes?
What is an argument in java?
What are java methods?
What is the use of volatile in java?
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
What is collections framework?
What is finalize()?
Is string serializable in java?