Java Programming - Returning a Value from a Method
A method returns to the code that invoked it when it completes all the statements in the method, reaches a return statement, or throws an exception, whichever occurs first.
You declare a method's return type in its method declaration. Within the body of the method, you use the return statement to return the value.
Any method declared void doesn't return a value. It does not need to contain a return statement, but it may do so.
1 Comments:
Nice bentot! galing ah.. wow programmer na xa.
Post a Comment
Subscribe to Post Comments [Atom]
<< Home