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 purpose do the keywords final, finally, and finalize fulfill?
List the features of java programming language.
What does it mean to flush a file?
Explain different types of wrapper classes in java?
What is java volatile?
What class allows you to read objects directly from a stream in java programming?
What is space character in java?
Explain method overloading?
What will be the output of round(3.7) and ceil(3.7)?
What is void data type?
When the constructor of a class is invoked?
What do you mean by append?
What is use of arraylist in java?
Is 9 a prime number?
Mention some features of java?