What is Overriding and how can it be used?

Answer Posted / arvind wagh

Overriding means same name methods in different classes

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 ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is square root in java?

588


In a container there are 5 components. I want to display all the component names, how will you do that?

1562


How many tetrahedral voids are there in bcc?

547


Will minecraft java be discontinued?

650


What is difference between module and function?

542






When is the arraystoreexception thrown?

570


What is the purpose of final keyword and when to use it?

528


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1023


When do you call copy constructor?

557


Is there a jre for java 11?

558


What is final class?

577


When does an object becomes eligible for garbage collection in java?

582


What is array class in java?

596


Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?

578


What is n in java?

539