What is Overriding and how can it be used?
Answer Posted / pranab dutta
If a class defines a method using the same name, return
type, and arguments in its super class, then it is called
Overriding. Methods are overridden to make them more
public. The method in the class overrides the method in the
super class.
When the method is invoked for an object of the class, it
is the new definition of the method that is called, and not
the method definition from super class.
| Is This Answer Correct ? | 46 Yes | 6 No |
Post New Answer View All Answers
What is static import in java?
Can we create an object of static class in java?
What is a consumer in java?
what is thread in Java ?
What are the disadvantages of using inner classes?
What is java life cycle?
In a container there are 5 components. I want to display the all the components names, how will you do that one?
What one should take care of, while serializing the object?
What methodology can be utilized to link to a database?
What is an enumeration?
How do you write a scanner class in java?
How do you check if a string contains only numeric digits?
What is wrapper class html?
What is data string?
How to create an immutable class?