Is it possible that an anonymous class instance is referred outside of its scope of definition?
However, the local variables are usually on the method calling-stack, and will be out of scope when the method returns. And the parameters passed into the methods are local copies of them (Read the topic pass-by-value). They will be out-of-scope too when the calling stack returns.However, if it is final, the local class can treat them as constant, and don’t care what happens to the original variable any more.There is some complication in the concepts of Java, since only primitive types are really automatic variables (on the calling-stack). There exists some criticism on this practice of Java, since it is less efficient. This is beyond the topics of SCJP, and enters the programming languages theory domain.