This will print out "inner". But why? Why not "outer"? Will the inner class always be chosen over the outer?
If I comment the inner class, the outer will be chosen.
In much the same way that a method local variable can shadow a class level variable with the same name, the class A is shadowed by the class TestInners.A.
Yes. Shadowing a class is a relatively rare thing - but the concept of shadowing in Java can apply to most anything with a name, including variables, methods, and classes.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.