Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java - Method Invocation & Execution

What is the difference between the invocation and execution of a method ? Are two the same thing ?

like image 628
Paul Avatar asked Mar 21 '10 11:03

Paul


2 Answers

I don't think these are standard terms. However I understand them the following way:

  • invocation is the event of issuing the call to the method; technically - placing the method onto the stack
  • execution is the whole process of running the method - from invocation till completion. And execution time is period during which the method body runs.
like image 58
Bozho Avatar answered Oct 18 '22 09:10

Bozho


Well, invoking a method means calling it by its name and parameters; executing a method means executing it.. running it, fetching its lines one by one and run them.

like image 28
Halo Avatar answered Oct 18 '22 07:10

Halo