class A
{
public void disp(int a,int b)
{
System.out.println("hai");
}
}
class B
{
public void disp(int a,int b,int c)
{
System.out.println("hai");
}
}
above program is overloading or overriding?
Answer Posted / raji
class A and class B have same function name but different
arguments.overriding is possible only when both class A and
class B have same function name and same arguments.
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
What do you mean by local class?
What is the difference between C++ and Java and your preferences?
Can an interface extend a class?
Does every java program need a main?
What is a for loop in java?
What is the destroy method?
What does the exclamation mark mean in java?
How many bytes is a url?
How to create a base64 decoder in java8?
Can we override a variable in java?
What is the meaning of variable in research?
What are the methods used to implement for the key object in the hash map?
What is xslt in java?
What are white spaces in java?
Name four container classes.