What is Overriding and how can it be used?

Answer Posted / ashish sharma

overriding comes with two class ( base and drived class )

function in the base class is like

public virtual void Display();

function in the drived class is like

public override void Display();

this function overrides the base class .

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a substring of a string?

565


What is the purpose of methodology?

641


What is port number in java?

593


What is the difference between the boolean & operator and the && operator in java programming?

567


Why are parameters used in functions?

534






What is scope & storage allocation of static, local and register variables? Explain with an example.

568


How do you decide when to use arraylist and linkedlist?

534


What happens if we override private method?

525


How do you do descending order in java?

521


Is oracle java 11 free?

533


What is the purpose of a transient variable?

585


How do you achieve polymorphism in java?

523


What is nested loop? What is dangling else condition in it?

574


What is the difference between menuitem and checkboxmenu item?

783


What is the advantage of preparedstatement over statement?

570