Hi Sanjana,
In the text:
Originally posted by sanjana narayanan:
Suppose that you make a class file " MyProg . java " . You would like to add a method to this class file such that the method is available to only the subclasses of this class & also to other classes in the same package as the one in which " MyProg . java " is defined .
I interpret the text as saying that the method should be available only to
1.) the subclasses of this class
2.) other classes in the same package
So for 1.) it does not say that these should be in the same package.
The text would have been less confusing I guess if it said:
...You would like to add a method to this class file such that the method is available only to other classes in the same package as the
one in which " MyProg.java " is defined and to the subclasses of this class... What do you think?
Gian Franco