I have a code from a tutorial:
public class Question_3_4 {
public static class Inner {
private void doIt() {
System.out.println("doIt()");
}
}
public static void main(String[] args) {
Question_3_4.Inner i = new Inner();
i.doIt();
}
}
Well, the Inner class is static, so I assume that the above code implicitly creates an instance of Question_3_4?
Question_3_4.Inner i = new Question_3_4.Inner();
gives the same result as the code above.
So I guess
Question_3_4.Inner i = new Question_3_4.Inner();
and
Question_3_4.Inner i = new Inner();
- same.
If my assumption is false, what am I missing here?
source
share