+ 3
return
void:does't return any value what does it mean : return? please!,explain me.
2 Answers
+ 3
re·turn
verb
1.
come or go back to a place or person.
"he returned to Canada in the fall"
synonyms: go back, come back, come home
"he returned to Halifax"
2.
give, put, or send (something) back to a place or person.
"complete the application form and return it to this address"
synonyms: give back, hand back;
noun
1.
an act of coming or going back to a place or activity.
"he celebrated his safe return from the war"
synonyms: homecoming
"his return to Oregon"
2.
a profit from an investment.
"product areas are being developed to produce maximum returns"
synonyms: yield, profit, gain, revenue, interest, dividend
"a quick return on investments"
^That's the definition of the word return. In this context, it's the act of returning data from the called method/function back to the method/function that called it. So lets say I created a method called public int GetSum(int a, int b).... Somewhere else in my code I would call that methood with GetSum(2,2); and then from the method GetSum() it would do its calculations to add the number and RETURN the result (or w/e) back to the code where I called GetSum() at. This is very useful when you want to return data back from a function so that you can use its results elsewhere.
+ 1
To return means to give back. A void function for example does not return a value which means it cannot be assigned to a variable.