What is a calling method and a called method?

Are the calling method and the called method the same?

What I would like to know is the "calling method", is it a method that in most cases calls another method, which is the main method, or the main method itself?

+4
source share
3 answers

The calling method is the method that contains the actual call; called method - the called method. They are different. For instance:

// Calling method void f() { g(); } // Called method void g() { } 
+20
source

The calling method is the method that contains the actual call.

The called method is called. They are different.

They are also called Caller and Callee methods.

for instance

 int caller(){ int x=callee(); } int callee(){ return 5; } 
+5
source

called method means method initialization. a method call means that we are using this initialized method.

0
source

Source: https://habr.com/ru/post/1410965/


All Articles