QUOTE(PennyBoki @ 7 Jul, 2007 - 11:31 AM)

Hi it doesn't compile because you don't call the variables from the Protection class. All you have to do is before the names n, n_pri, n_pro, n_pub just add the word super. don't forget the dot.
That is how you access the base class members whether they are functions or variables.
!!!!!!!Not true!!!!!!!!!Adding super in this situation is not necessary.
You only have to use super if the variable of the base class is hidden in the current scope (that is not true in this case), or when you call constructors, because they are not inherited.
itpro:
For me your code compiles just fine, and runs ok.
Check the following:
1) are those java files (Protection.java and Derived.java) both in a directory called p1?
2) cd to the parent directory of p1
3) write javac p1/*.java (this way the compiler will take care of dependency problems, and you don't have ot care about what ot compile first...)
If it works, and doesn't produce any error, then you might have a problem with jDev's or the project's configuration.
This post has been edited by 1lacca: 7 Jul, 2007 - 02:21 AM