In the case of ordinary classes or when you define a java method, you must define a return value type or use a void placeholder.
Then return a return value at the end of the method body, which needs to be consistent with the return value type when defined. Then when this method is called, the return value will be transferred to the calling location.
To put it simply, the return value is to return a signal or result to you after doing something.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
The above is the detailed content of What is the return value in Java. For more information, please follow other related articles on the PHP Chinese website!