What is calling method and called method?

Are calling method and called method both same?

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

1

3 Answers

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

// Calling method void f() { g(); } // Called method void g() { } 
2

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

The called method is the method being called. They are different.

They are also called the Caller and the Callee methods.

For example

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

called method means initialization of a method. calling method means where we are using that initialized method.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like