हिंदी

Differentiate between calling method and called method.

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 [पृष्ठ ९१]

APPEARS IN

रुपा पंडित Computer Applications [English] Class 10 ICSE
अध्याय 3 User-Defined Methods
Exercises | Q 4. (iii) | पृष्ठ ९१
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×