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 does singleton mean in java?
What do you mean by stack?
What is a variable analysis?
What is a functional interface?
Explain different types of wrapper classes in java?
Can we use both this () and super () in a constructor?
What are the advantages of passing this into a method instead of the current class object itself?
What is a locale?
How to access arraylist elements in java?
What is the return type of the main method?
What is an example of a constant variable?
What is an object in java?
Does java support multiple inheritance or not?
What is the basic concepts of OOPS?
Can a static method be final?