Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

method invoked or method called?

I am not sure if this question is relevant but I see the expression "the method is invoked" a lot , So Is there a technical difference between invoking a method or calling a method or It's just other word for the same action ?

P.S : Clearly , I am not an English native speaker and looking for invoke definition on the web didn't help .

like image 348
Ahmed Avatar asked Oct 19 '10 20:10

Ahmed


People also ask

What is invoked method?

Java Method invoke() Method The invoke () method of Method class Invokes the underlying method represented by this Method object, on the specified object with the specified parameters. Individual parameters automatically to match primitive formal parameters.

What is invoke method in Java?

invoke() . The first argument is the object instance on which this particular method is to be invoked. (If the method is static , the first argument should be null .) Subsequent arguments are the method's parameters. If the underlying method throws an exception, it will be wrapped by an java.

What do you mean by method invocation?

The method invocation statement calls a method defined for the class of a reference variable. This statement is used for methods of user classes, system classes, and external classes. You can invoke any method defined for the class of the reference variable or any inherited method from the variable's superclasses.

Is invoking a method the same as calling a method?

With call , you can write a method once and then inherit it in another object, without having to rewrite the method for the new object. So, the major difference between invoking and calling comes in terms of the this object. Calling let's you set the this value whereas invoking just ties it to the global object.


1 Answers

"Invoking" a method and "calling" a method are the same thing.

like image 183
RichieHindle Avatar answered Sep 21 '22 02:09

RichieHindle