what is overloading in java?
Answer Posted / sivaprasad addepalli
Method Overloading comes into picture when there are two
methods with same name but it must differ in one of the
follwing:
--> Number of arguments.
--> Datatype of arguments.
--> Order of the arguments.
for ex:
class sample
{
public:
void add (int a, int b)
{
}
void add (int a, int b, int c)
{
}
}
In this case the number of arguments are different so it is
method overloading.
| Is This Answer Correct ? | 20 Yes | 3 No |
Post New Answer View All Answers
What does I ++ mean?
What is boolean logic?
How do you pass by reference?
Is cout buffered?
What is a numeric string?
write a program that list all permutations of ABCDEF in which A appears before B?
Is array a class in java?
Is 64bit faster than 32 bit?
What is the use of isempty in java?
Can interface be private in java?
Can inner class be public in java?
Why put method is used?
What is a pointer and does java support pointers?
What technique is carried out to find out if a particular string is empty?
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?