what is an virtual function

Answers were Sorted based on User's Feedback



what is an virtual function..

Answer / ejp

There are no virtual functions in Java so the question is
futile. There are non-final functions, which can be
overridden by a derived class.

Is This Answer Correct ?    2 Yes 0 No

what is an virtual function..

Answer / 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

More Core Java Interview Questions

Can you instantiate the math class?

0 Answers  


What is sleep method?

0 Answers  


What are different types of classloaders?

0 Answers  


What are field variable and local variable?

3 Answers  


Under what circumstances an object reference be cast to an interface reference?

3 Answers  






How an object is serialized in java?

0 Answers  


1.) if we use "private" in place of "public" in public static void main()... 2.) if we use "int" in place of "void".... 3.) can we ommit "static" keyword from that statement.... 4.) also can we give the command line arguments type as int type or float,etc.(.i.e (string args[]))

1 Answers  


What are loops in java? What are three types of loops?

0 Answers  


How to change the priority of thread or how to set priority of thread?

0 Answers  


What is the use of flag?

0 Answers  


what is overloading and overriding with example?

2 Answers   CMC,


I want to persist data of objects for later use. What’s the best approach to do so?

0 Answers  


Categories