Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Sorry, i accidently hit the Post button as i was still composing my question... Again i've got a class A and a protected inner class B with a protected constructor: public class A{ And i've got a class C that inherits form A. In C there's a method which should create some Objects of B. The following code only compiles if B is declared public: public class C extends A{ If B is still protected, the compiler complains about a missing constructor of B with signature (C, String, boolean). I know that's something about the 'secret' reference to A (or C??) which has to be passed to the constructor of B. But why does it work with B declared public? And i don't want to declare B public, so how can i do this with a protected B? I've tried the following: Thanks for your help,
Replies:
|
Sponsored Links
|