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 are the principle concepts of oops?
What are the different types of constructor?
What is protected in java?
How can I debug the Java security exceptions and AccessControlExceptions?
What type of language is java?
What is the largest long allowed by java?
Why scanner is used in java?
What is the function of log?
What are the different types of java?
Is null in java?
Explain scope or life time of local variables in java?
Is singleton class thread safe?
What is nullpointerexception?
Why is stringbuffer called mutable?
Which number is denoted by leading zero in java?