Professional Documents
Culture Documents
Local and Global Variables
Local and Global Variables
Note :
1. Arguments passed to methods are also local in
scope.
2. It is compulsory to initialize local variable with initial
value.
Global Variables are variables defined out side block or
with in class outside method and there scope is
available for complete class , they can be acsessed any
where with in class.
Example
Example