If you separate the two classes A and C in two different packages then it won't work. There is a reason for that. The class B is declared protected and its constructor is also protected. The meaning of protected memeber is that you can access it in only two cases 1) If you are accessing it from the same package. 2) If you are accessing it from its descendant. I put A and C in two packages. Since C inherits A , C has access to the definition of protected B in class A. So in class C if you just write B b ; // Note that I am just declaring a variable of type B // I am not instantiating B then its is OK because in class C you have access to the protected memeber of class A ( A being ancestor of C ) . But you cannot access the protected construtor of B in class C because class B is neither ancestor of class C nor is it in the same package as class B ( A$B ) . You can think of it differently as class A$B is a class whose construtor is protected. So you can always access its constructor from the same package or its descendant. Thanks for asking such a good question.