Local classes have different scope rules. From the JLS, section 6.3:
"The scope of a local class declaration immediately enclosed by a block (§14.2) is the rest of the immediately enclosing block, including its own class declaration. "
In your first example, you call the constructor of Inner class before the scope of this inner class, therefore it is illegal.
TO illustrate this in your code:
void outerMethod() {
// ...
// ...
// Beginning of legal usage scope of the local class
class Inner {
void innerMethod() {
System.out.println("inner class method...");
}
}
// ...
// ...
// End of legal usage scope of the local class
}