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 |
How do you check if a character in a string is a digit or letter?
What is sortedmap interface?
Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain
What is the point of polymorphism java?
What is comparable and comparator interface? List their differences
What is a parameter in matrices?
while creating thread why we extend thread class
What is the difference between a scrollbar and a scrollpane?
Can we assign the reference to this variable?
what is the difference between equals method and ==
17 Answers IBM, Professional Access, TCS,
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
What methods are used in Servlet?Applet communication?