当前位置: 动力学知识库 > 问答 > 编程问答 >

terminology - 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 .

网友答案:

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

网友答案:

There isn't typically a technical difference.

If I were to describe my own usage of the terms, I suppose I would reserve "invocation" for the subset of method calls where there is no value being returned or the value returned is (or can be) ignored. In other words I typically wouldn't say I'm invoking a function.

For instance, I would sooner say that "method A invokes Thread.start()" than "method B invokes toString()". Invoke has the connotation of starting an action. But I would say that I call either of them.

分享给朋友:
您可能感兴趣的文章:
随机阅读: