In the following code snippet, presumably it appears that it should issue some compilation error but it doesn\'t:
class Outer { public static class Inner {
Think of the inner class has actually have its own .java file. That will make it clear to you why it chooses the variable over the Inner class.