Local Variables
-
Are declared in methods, constructors, or blocks.
-
Are created when the method, constructor or block is entered and the variable will be destroyed once it exits the method, constructor, or block.
-
Access modifiers cannot be used for local variables.
-
Are visible only within the declared method, constructor, or block.
-
Are implemented at stack level internally.
-
There is no default value for local variables, so local variables should be declared and an initial value should be assigned before the first use.
Local Variables —
Structure map
Clickable & Draggable!
Local Variables —
Related pages: