what is an virtual function

Answer Posted / nishi tomar

A virtual function is a member function of a class, whose
functionality can be over-ridden in its derived classes. It
is one that is declared as virtual in the base class using
the virtual keyword. The virtual nature is inherited in the
subsequent derived classes and the virtual keyword need not
be re-stated there. The whole function body can be replaced
with a new set of implementation in the derived class.

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is finally block?

561


Can we use different return types for methods when overridden?

552


What is an association?

541


What is difference between protected and private?

522


What is the difference between java applets and applications?

560






What are parsers? Dom vs sax parser.

552


What is java oops?

549


Why vector is used in java?

552


Can a constructor be made final?

656


What classes of exceptions may be caught by a catch clause in java programming?

696


What do you understand by java virtual machine?

700


What is a class object?

496


Why are pointers not secure?

529


Why isn’t there operator overloading?

585


What is the final variable?

572