Advertisements
Advertisements
प्रश्न
Differentiate between calling method and called method.
फरक स्पष्ट करा
Advertisements
उत्तर
| Feature | Calling Method (Caller) | Called Method (Callee) |
| Role | The method that initiates the execution by invoking another method. | The target method that is being invoked and executed. |
| Control Flow | Pauses its own execution and passes control to the target method. | Receives control, runs its block of code, and then returns control back. |
| Arguments vs Parameters | Sends actual data (arguments) inside the method parentheses. | Receives data definitions (parameters) inside its signature header. |
| Example Scenario | Inside the main() method, you run calculateSquare(5); → main() is the caller. | The definition public void calculateSquare(int x) → calculateSquare is the callee. |
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 3: User-Defined Methods - Exercises [पृष्ठ ९१]
