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 / shereef.k
It is neither Overloading nor Overriding , because these two methods are defined in two different class, and it can make overlaoding when class B extends Class A. It can never make Overriding because the parameter list in two methods are different.
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
What is binary search in java?
Why does java have two ways to create child threads? Which way is better?
What is data member in java?
Explain numeric promotion?
How do you sort words in java?
How variables are stored in memory?
How many return statement are allowed in a function?
When should a function throw an exception?
How would you dynamically allocate memory to an array?
When will we use them?
How does regex work?
Why 1 is not a prime number?
What are the differences between graph and tree?
What are identifiers in java?