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 the difference between this() and super() in java?

525


Is vector ordered in java?

527


What is the difference between a vector & an array list?

663


What is meant by inheritance and what are its advantages?

566


What do you mean by light weight and heavy weight components?

545






How many types of interfaces are there?

566


Is break statement can be used as labels in java?

495


When will you define a method as static in Java?

558


How do you classify Dialog Box?

638


What is object-oriented programming?

563


Explain the meaning of java applet.

595


Can we have multiple public classes in a java source file?

547


What do you understand by looping in java? Explain the different types of loops.

550


Explain the polymorphism principle?

565


Can we compare two strings in java?

549