Tom Reilly wrote:The default class modifier allows a class to be used (i.e. new C()) from any other class within the same package. It does not, however, allow classes within the same package to extend the class. You must set the class modifier to protected or public to do that.
Hello Tom, thanks for the quickly response.
If I'm not wrong, a class cannot have a protected modifier. I've tried to instantiate a variable of type C instead of extending the C class (the code is shown below), but I still get the same error. The compiler still can't find the class C.
I've tried, just for curiosity, to extend and instantiate the A class (wich is public) and it worked with no problems, as we would expect.
Any ideas?
Thank you