PPT Slide
Execution of statement
return <expression>
terminates execution of the method (function) in which it appears and “returns” the value of <expression> to the place of call.
Example of calls:
c.setX(3);
c.setY(2);
x
//Store 85 in s
s= c.sumSquares();
x 9 y 2
Previous slide
Next slide
Back to first slide
View graphic version