can we have virtual functions in java?

Answer Posted / krishna

First of all that I would like to tell u that there is no keyword like virtual in Java. and all the guys are saying that all methods are virtual in Java. But it is not true.
While we try to override private methods then it is not override. this shows all the methods are not virtual in Java.

Is This Answer Correct ?    5 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between method overloading and method overriding in java ?

581


What is the constructor?

587


How will you communicate between two applets?

637


What does jenkins do?

490


What is the default access specifier for variables and methods of a class?

573






What is the difference between equals() and == in java?

533


What is the use of callablestatement?

582


Can abstract class have private constructor?

504


How do you check if a number is a perfect square?

518


What is a class reference?

557


What is the purpose of final keyword and when to use it?

532


Can we override private constructor in java?

511


List the features of java programming language.

567


If you do not want your class to be inherited by any other class. What would you do?

566


Write a code to create a trigger to call a stored procedure

540