The following program is Overloading or Overriding?
public class PolymorphismEx {
public int sampleMethod(int a) {
return a;
}
public String sampleMethod(int a) {
return "Is it Overloading or Overriding???";
}
}
Answer Posted / venkat asha reddy
it is neither overloading nor overriding. it throws method
ambiguity exception while compiling
| Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
What is the synonym of procedure?
What do you mean by static variable?
What is the importance of finally block in exception handling?
What is an interface in java?
Why synchronization is important?
What is integers and example?
What is the dot operator?
What happens if main method is not static?
What is a buffer in java?
What is map java?
Can a class be private or protected in java?
What is ++ a in java?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?
What is the difference between dom and sax parser in java?
Define the term string pool?