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 / jagadish
Duplicate Method sampleMethod(int a) Error Message will display
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is meant by design patterns?
Is a copy constructor?
What is regex in java?
What access modifiers can be used for methods?
What is widening and narrowing in java? Discuss with an example.
What are the differences between c++ and java?
What is the difference between stringbuffer and stringbuilder?
What are data types in oop?
What is the vector class in java programming?
Can we override the private methods?
What is difference between synchronize and concurrent collection in java?
Can extern variables be initialized?
How do you sort arraylist in descending order?
What are keywords in java?
What is the buffer limit?