What is the difference between a virtual method and an abstract method?



What is the difference between a virtual method and an abstract method?..

Answer / Manju Rani

An abstract method is an incomplete method declared in a base class that must be implemented by its derived classes, while a virtual method can have an implementation in the base class but also allows derived classes to override it if necessary. Virtual methods are denoted by the 'virtual' keyword.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOAD Interview Questions

What is the use of ‘finalize’?

1 Answers  


what are the different ways for a method to be overloaded?

1 Answers  


Difference: Sequence Diagrams, Collaboration Diagrams ?

2 Answers   Protech,


What is guard condition?

8 Answers   Mannar Company, Syntel,


What is the use if instanceof keyword?

1 Answers  


What is the purpose of late binding in object-oriented programming?

1 Answers  


If there is a conflict between base class method definition and interface default method definition, which definition is picked?

1 Answers  


Explain OOPS.

1 Answers   Ittiam Systems,


How many instances can be created for an abstract class?

1 Answers  


Explain about abstraction?

1 Answers  


How a program can be structured using the concept of object oriented programming?

1 Answers  


Can we access interface static method using interface references?

1 Answers  


Categories