I wrote the following codes to
test the access modifiers of inner classes:
When compiled, line1 is ok, but line2 causes a compile error: Inner2() has protected access in p1.A.Inner2(both the code--remove package&import lines--are ok if they were put in the same directory). Where am I wrong? Can we use inner class as general class members? Or using inner class like this is meaningless?