Javatpoint Logo

what is virtual function in java

By: hsingh*** On: Fri Sep 05 15:04:26 IST 2014     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
Please give full detail about virtual functions in java.Up0Down

 

with the same singnature of a function whose behavior within a inheriting class can be overridden is called a virtual function

all non static are considered as virtual by default to remove default virtual feature in each function you have to make it
private or final in java classes.


Although Java does NOT have a virtual keyword, Java has virtual functions and you can write them.

In object-oriented programming, a virtual function or virtual method is a function or method whose behaviour can be overridden within an inheriting class by a function with the same signature. This concept is a very important part of the polymorphism portion of object-oriented programming (OOP).
Image Created0Down

By: [email protected] On: Fri Sep 05 16:50:41 IST 2014 Question Reputation0 Answer Reputation392 Belt Series Points0 392User Image
Are You Satisfied :0Yes0No