can we have virtual functions in java?

Answer Posted / amar

In object-oriented programming, a virtual function or
virtual method is one whose behavior can be overridden
within an inheriting class by a function with the same
signature. irtual functions are abstract methods in java. by
default
all the methods are abstract in interface.

Is This Answer Correct ?    20 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the difference between an abstract class and interface in java?

784


What is treemap in java?

723


What is the formula to calculate percentage?

748


How does java pattern compile work?

743


How will you serialize a singleton class without violating singleton pattern?

1746


What is runtime polymorphism or dynamic method dispatch?

766


Can a private method of a superclass be declared within a subclass?

743


What is stringjoiner ?

744


What do you mean by default constructor in java?

813


What are loops in java?

784


What is the use of default method in interface in java?

766


Why are lists ordered in java?

776


Why for each loop is used?

747


What are different types of control structures?

715


What if static is removed from main method?

791