Search:     Advanced search
Browse by category:
C/C++   |   Java   |   Oracle/Database   |   SAP   |   ASP .NET   |   Mainframe-DB2   |   Freshers

Can you have virtual functions in Java?

Add comment
Views: 387
Votes: 0
Comments: 0
Yes, all functions in Java are virtual by default. This is actually a pseudo trick question because the word "virtual" is not part of the naming convention in Java (as it is in C++, C-sharp and VB.NET), so this would be a foreign concept for someone who has only coded in Java. Virtual functions or virtual methods are functions or methods that will be redefined in derived classes.
Others in this Category
document The EJB container implements the EJBHome and EJBObject classes. For every request from a unique client, does the container create a separate instance of the generated EJBHome and EJBObject classes?
document Give the Details of XML files used in Validator Framework?
document If my class already extends from some other class what should I do if I want an instance of my class to be thrown as an exception object?
document What is static in java?
document What are the different kinds of enterprise beans?
document Q: What if the main method is declared as private?
document What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?
document Q: What is the purpose of garbage collection in Java, and when is it used?
document What are the types of messaging?
document Java Video Tutorial 1: Installing the Java Develop
» More articles



RSS