2.2.5 How to Understand Local References in Methods

Variables that are defined and used within a method lose their reference after the method finishes executing. The implication here is that if you need to keep using the variable's value you either need to pass it to another method as an argument or use a return statement to return it to another method.