English

When a method returns the value, the entire method call can be assigned to a variable. Do you agree with the statement? - Computer Applications

Advertisements
Advertisements

Question

When a method returns the value, the entire method call can be assigned to a variable. Do you agree with the statement? 

Short Answer

Solution

  1. Yes.
  2. Example: 
     int c = Obj.add(a, b);

    In this example, the add(a, b) method returns a value assigned to variable c.

shaalaa.com
  Is there an error in this question or solution?
Chapter 5: User - Defined Methods - EXERCISES [Page 336]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 5 User - Defined Methods
EXERCISES | Q VI. 3. | Page 336
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×