posted 23 years ago
Hi James,
Heres my understanding
When you declare a class within a method, it will be instantiated when the method is called. The local variables of the method go out of scope once the method is completed, but the
class can still 'outlive' the method. If the class had access
to the local variables, then we would have a conflict, right ?
If the variable is final in the method, the class can access it
since it will behave as a constant value. So no problem here.
Please corret me if i am wrong here.
Sajida