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
Can You Have Virtual Functions In Java?
What are static initalizers in java ?
What is a Transient Object?
What is remote method invocation (rmi)?
Write a program to find the whether a number is an Armstrong number or not?
What are the different access modifiers available in java?
What is a local block?
Does sprintf allocate memory?
Which method must be implemented by all threads?
In the below example, how many string objects are created?
Write a program to search a number in the given list of numbers.
What is object in java?
What is the full name of java?
What happens when a thread cannot acquire a lock on an object in java programming?
What is the use of static methods?