Java Glossary : invoke

CMP home Java glossary home Menu no menu Last updated 2004-06-28 by Roedy Green ©1996-2004 Canadian Mind Products

Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

You are here : home : Java Glossary : I words : invoke.

invoke
To call a method. The JVM has four different types of byte-code instructions for invoking a method. Ordered from slowest to fastest they are:
  1. invokeinterface:
    Used to call a method via an interface reference. Method is not at the same slot in each class.
  2. invokeinstance:
    Used to call an ordinary instance method. The method is potentially overrideable, so the JVM has to decide at run time which variant to use.
  3. invokespecial:
    Used to call a specific instance method, when the particular method is known an compile time, e.g. when the method is final,
  4. invokestatic:
    Used to call static methods. There is no object or this parameter to deal with.
Instead of using invokestatic or invokespecial, the compiler might expand the method inline for short methods.


CMP logo
CMP_home
home
Canadian Mind Products CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[24.87.56.253]
Your IP:[80.134.30.163]
You are visitor number 971.
Please send errors, omissions and suggestions
to improve this page to Roedy Green.
You can get a fresh copy of this page from: or possibly from your local J: drive mirror:
http://mindprod.com/jgloss/invoke.html J:\mindprod\jgloss\invoke.html