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:
I have coded two classes (in the same package): public class A { public class B extends A { The line "i = 42;" results in an error message: I thought, when extending a class the child-class (B) gets the member i and the corresponding getI and setI Methods. But this is not the fact. Why? PS: I am of course able to access it via the getI and setI methods - but this seems to be programming around the corner - isn't it...
Replies:
|
Sponsored Links
|