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
Can a class have more than one object?
What class of exceptions are generated by the java run-time system?
What is the purpose of lambda expressions?
Can we execute a program without main?
How to do encapsulation in java?
What is the instance of an object?
What is the purpose of static keyword in java?
What are structs in java?
List the different types of classloaders in java.
What is the finalize method do?
v-model life cycle
Why is the main method declared static?
What is nextint java?
Why are the methods of the math class static?
Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?