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 difference between calling start() and run() method of thread?
Explain the advantages of packages in java?
What is string in java is it a data type?
What is the difference between method and means?
What is the static block?
Differentiate between == and equals().
Describe the various concepts related to object oriented programming (oop).
What is a condition in java?
Explain the use of shift operator in java. Can you give some examples?
Is 0 a real number?
Differentiate between run time error and syntax error.
What is object english?
Why parsing is done?
What is regex java?
What is a void in java?