how you will prevent method overriding?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / murali.25
you also prevent overriding by making the method static
| Is This Answer Correct ? | 3 Yes | 6 No |
Answer / sonam
You can prevent method overriding by declared method as
static
| Is This Answer Correct ? | 0 Yes | 4 No |
What are the different collection views provided by maps?
Can a static member function access member variable of an object?
What is file in java?
Can you override static method in java?
What are the different tags provided in jstl?
What is the ==?
Explain about vector, dictionary,hash table, property classes?
Can we extend immutable class?
Is array an object in java?
Give example to differentiate between call by value and call by reference.
Why declare Main() inside the class in java ?
What are the 6 mandatory procedures for iso 9001?