virtual : Java Glossary


Virtual in C++ means overrideable. In Java all methods are assumed overrideable unless marked final (or private which implies final). Virtual has yet another meaning in C++. When you inherit from several classes, which may share a common subclass, in C++ you have to decide how many copies of the base class variables you want — a shared or separate embedded in this new object. virtual refers to using a single shared copy. In Java you can inherit from only one class, so the problem never comes up.

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number