Document Summary

In order for a value returning method to return a result, a return statement using keyword return is required within the method body: use the keyword void when the method performs operations without returning a value, a return statement is not required in the body of a void method, but it can be used for terminating the method and returning to the method"s caller, two ways to call a method a. If a method returns void, a call to the method must be a statement: call stack, a call stack stores the activation records in a last in, first out fashion, when a method finishes its work and returns to its caller, its activation record is removed from the call stack, arguments/variables/parameters for a method, the arguments or variables passed to a method are not affected, regardless of the changes made to the parameter inside the method, the changes to the variables only exist within the scope of the method.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents