What are virtual functions

Showing Answers 1 - 4 of 4 Answers

Mayank

  • Jul 26th, 2005
 

Functions which are called at runtime are known as virtual functions. Virtual functions are used to encorporate runtime polymorphism or in other words dynamic binding.

  Was this answer useful?  Yes

Devidas Sonawane

  • Nov 10th, 2005
 

JVM is a java virtual machine means the M/c which is invisible that's why logical Virtual word is used. The M/c which is works on Virtual Functions is called virtual functions.

  Was this answer useful?  Yes

gmenon

  • Nov 28th, 2005
 

All methods in Java are virtual i.e. always the most derived version of the method is called

  Was this answer useful?  Yes

mercury

  • Sep 6th, 2006
 

Virtual Functions are useful in implementing polymorphism which is runtime binding/dynamic binding;

Whereas Overloading(Function Overloading & Operator Overloading) implement compile-time binding/static binding;

Virtual functions are used in case of inherited classes(base class & derived class); By using virtual function it is possible to use the base class pointer to point to the derived class object;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions