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 are the 3 types of control structures?
Can you start a thread twice in Java?
What is the main difference between java platform and other platforms?
Explain what are final variable in java?
Explain java coding standards for constants?
What does system out println () do?
What is the syntax and characteristics of a lambda expression? Explain
How do you sort objects in java?
How to obtain a performance profile of java program
Is a case study a method or methodology?
What is the memory leak in java?
What is classname class in java?
What is string buffer?
What do you understand by the bean persistent property?
What is the purpose of methodology?