Answer Posted / sumit
One can prevent method overriding by marking the method final. if you make a method static and reuse it in the subclass it will hide the the super class method. This is called method hiding rather than overriding.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
How can an exception be thrown manually by a programmer?
Difference between overriding and overloading in java?
What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
Can a static method be overridden in java?
What are actual parameters?
What does n mean?
Can you call a method on a null object?
Why we used break and continue statement in java?
What do u mean by variable?
What is the purpose of java?
How to make a write-only class in java?
What is the difference between conversation & casting?
What is assembly language?
Explain what do you mean by functional overloading in java?
How do you compare values in java?