Specifications

Sun Services
Java™ Programming Language
Module 4, slide 5 of 31
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Variables and Scope
Local variables are:
Variables that are defined inside a method and are
called local, automatic, temporary, or stack variables
Variables that are created when the method is executed
are destroyed when the method is exited
Variable initialization comprises the following:
Local variables require explicit initialization.
Instance variables are initialized automatically.