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 an object’s lock and which object’s have locks?
What are the parts of a method?
Which keyword specify that a variable is effectively final ?
What super () does in java?
What classes of exceptions may be caught by a catch clause in java programming?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
Is 0 an even number?
What is the difference between abstract classes and interfaces?
Implementations of set interface?
What is the collections api?
What is the purpose of the enableevents() method in java programming?
Explain the importance of finally over return statement?
What are the six ways to use this keyword?
What is finally block?
What is nan in java?