हिंदी

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

प्रश्न

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

लघु उत्तरीय

उत्तर

  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
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 5: User - Defined Methods - EXERCISES [पृष्ठ ३३६]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 5 User - Defined Methods
EXERCISES | Q VI. 3. | पृष्ठ ३३६
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×