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
Can we catch more than one exception in a single catch block?
Explain creating threads by implementing runnable class?
What is void keyword?
What are the characteristics of Final,Finally and Finalize keywords.
what methods would you overwrite in java.lang.object class?
Can a main method be declared final?
Is string pool garbage collected?
Can you explain the meaning of aggregation and composition
How to use string tokenizer class.
What is the byte order of byte buffer?
What is a nullable field?
How do you replace all in word?
What is the purpose of main function in java?
Which is better arraylist or vector?
Why is a string immutable?