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
Mention some features of java?
What is the importance of main method in Java?
What is the differences between c++ and java? Explain
Is map ordered in java?
What do you understand by weak reference?
Why null value is used in string?
What is a lock or purpose of locks in java?
Explain the features of interfaces in java?
Is main a function?
What do you mean by formatting?
How to perform bubble sort in java?
What is the default size of arraylist in java?
Can you create an object of an abstract class?
What is a method in coding?
Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?