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
What is nextint java?
What is a locale?
What is the difference between access specifiers and access modifiers in java?
Explain implementation and how is it different from conversion?
What are the different types of constructor?
What are different ways of object creation in java ?
Explain serialization and deserialization in java?
How can we create an immutable class in java?
Can java hashmap have duplicate keys?
What is the difference between applet and application?
For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green White will have 1 Weight. Red and Green carry no weights. Shortest path is the path with less weight when you add up the weights in the path.
I want to persist data of objects for later use. What’s the best approach to do so?
Does constructor be static?
What is the final class modifier?
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?