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
How to use arraylist in java netbeans?
Can a class be a super class and a sub-class at the same time? Give example.
How do you remove duplicates in java?
What do you mean by chromounits in java8?
which class is the wait() method defined in? : Java thread
Are global variables initialized to zero?
Is null an object java?
What do you know about the garbage collector in java?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
What are loops in java?
What is an immutable object?
Can we clone singleton object?
Why are global variables used?
What is object cloning in Java?
When is the finalize() called?