I am going through chapter 1 of
SCJP for
Java 5 by By Kathy Sierra and Bert Bates.
I am trying out the Protected members sample code on page 34-35. I have a folder called Ex2. Ex2 has two subfolders called certification and other as in the code sample. Folder "certification" holds the Parent.java, which compiles fine. Folder "other" holds Child.java. When I go to compile Child.java, I get 3 errors starting with package certification does not exist.
Here is the code:
and
I follow the following order when I compile the files-
set CLASSPATH=h:\Java\SCJP\Ex2
cd c:\Program Files\Java\jdk1.6.0_06\bin
javac h:\Java\SCJP\Ex2\certification\Parent.java
javac h:\Java\SCJP\Ex2\other\Chile.java
I am not sure what I am doing wrong...