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
Is it possible to compare various strings with the help of == operator? What are the risks involved?
Is string is a keyword in java?
Can a static class implement an interface?
Can you give names of Container classes?
What is string in java with example?
Explain the difference between an Interface and an Abstract class?
What are the new features in java 8?
Define jre i.e. Java runtime environment?
What is the multi-catch block in java?
Why strings in java are called as immutable?
Are arrays static in java?
What is classpath?
What are the advantages of inner classes?
What is a instance variable?
What is final?