Ask a Teacher



what is the use of return statements in a function when written in a java programming?

The return statement is used to explicitly return from a method. That is, it causes program control to transfer back to the caller of the method. As such, it is categorized as a jump statement. A brief look at return is presented here.


comments powered by Disqus