I think you are executing wrong command.
If I am not wrong you are executing
It should be
Note the change in case
Marcus Biel wrote:Your classes are both in the same package. importing p1.*; does not compile.
Did you take the time to test that before posting?
Sachin Tripathi wrote:when i compile both .java files both got compiled.
Marcus Biel wrote:p.s.: protected is a complex beast. Try to avoid it. Try to avoid inheritance alltogether.
Nope. Don't. Don't.