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?
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?
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()
{
}
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.