What is Overriding and how can it be used?

Answer Posted / gopalramana

To define method in subclass having same method name as
method in superclass having same return type,same
parameters,then method in subclass should be override
method in superclass.

used in code repalcement.

Is This Answer Correct ?    17 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why array is used in java?

486


what is the swingutilities.invokelater(runnable) method for? : Java thread

521


What is the use of default method in interface in java? Explain

525


Can you sort a string in java?

466


Define the term string pool?

553






What are the types of strings?

539


Can we override private method?

533


What is the exception hierarchy in java?

462


How many tetrahedral voids are there in bcc?

523


What are the rules for naming an array?

497


How are the elements of a gridbaglayout organized?

515


What is the final keyword in java?

529


You're given a Boolean 2D matrix, can you find the number of islands?

566


What comes to mind when someone mentions a shallow copy in java?

629


What is communist flag?

550