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
Difference between error and exception
What is an immutable class? How to create an immutable class?
Explain the hierarchy of java exception classes?
What does %4d mean in java?
Is there any way to find whether software installed in the
system is registered by just providing the .exe file?
I have tried the following code but its just displaying the
directory structure in the registry.
Here the code :
package com.msi.intaller;
import java.util.Iterator;
import ca.beq.util.win32.registry.RegistryKey;
import ca.beq.util.win32.registry.RootKey;
public class RegistryFinder {
public static void main(String... args) throws Exception
{
RegistryKey.initialize(RegistryFinder.class.getResource("jRe
gistryKey.dll").getFile());
RegistryKey key = new RegistryKey(RootKey.HKLM,
"Software\\ODBC");
for (Iterator
What is binary tree in java?
What is the collections api?
What is a treeset class?
Define nashorn in java8.
What technique is carried out to find out if a particular string is empty?
What is palindrome in java?
Explain the difference between static and dynamic binding in java?
how is final different from finally and finalize in java?
Explain when we should make an instance variable private.
What is a treemap in java?