
// variables have names, types, scope and lifetime
// scope is a compile time concept, the scope is "on the page"

class ScopeExample
{


   public static
   void main ( String [] args ) 
   {
     // int i ; // illegal, scope conflicts with int i below.
       if ( true ) 
       {
          int i ;
          j = 5 ;
          i = 3 ;
       }
       int i ;  // legal, scope of above int i is not here.
       i = 2 ;
       
   }

   static
   int j ; // instance variables, class variables
}

