>>> Look for optimisations (if necessary) at a higher level.
>>
[quoted text clipped - 11 lines]
>
> - Oliver
>> Was this an interview for a Java related position? Because AFAIK,
>> Java itself has no concept of "virtual" methods. Rather, it's a term
>> borrowed from C++. What I'm getting at, I guess, is that I suspect
>> it's conceivable for someone to be the worlds greatest Java
>> programmer, and to have no idea what "virtual methods" are.
> I'd word that differently.
Yup, it's a common case of an interview question depending on incorrect
terminology.
> All java methods are virtual and can't be none-virtual, and so no
> keyword is needed.
Point of pedanty: Not all of them. Private methods, calls to super
methods, static methods, static initialisers, as well as constructors
use different, non-virtual bytecode (invokestatic and invokespecial
instead of invokevirtual and invokeinterface, IIRC). At runtime anything
(consistent with the spec) can happen. Even interface methods
implemented in dynamically loaded classes can be inlined.
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/
AndrewMackDonna - 04 Jul 2006 21:37 GMT
>>> Was this an interview for a Java related position? Because AFAIK,
>>> Java itself has no concept of "virtual" methods. Rather, it's a term
[quoted text clipped - 18 lines]
>
> Tom Hawtin
Cheers, I was a bit lazy there... I was simply referring to public
instance methods, rather than the other types.