Answer the question
In order to leave comments, you need to log in
Difference between invokevirtual & invokespecial?
Hello! Am I understanding the difference between the two instructions correctly?
invokevirtual is used to call methods on an object, and a reference to the object that owns the class (aload i) is pushed onto the stack as a parameter. invokespecial is used to initialize a class and call private methods. In the case of calling private methods, a reference to the owner object (this) is always written to the stack with the aload 0 command.
Please respond to those who know. Thank you very much
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question