<pre>
public class Test {
class Inner {
//do inner stuff This is a member class
}
public void sampleMethod() {
class InMethodClass{
//do local inner class stuff.
}
}
}
</pre>
Because the InMethodClass in inside a method that will not last forever, the conditions for creating that class are special. For instance it can not use the local variables of the enclosing method unless they are final variables. This is because local variables die when the method is over, but objects live on until they no longer have a reference. They can't use a variable that is already dead. Final variables get created in the Constant Pool and don't die.