one accessibility feature missing?

I was just reading protected specifier in C#, that an idea came to my mind

is there a way i can restrict a member in my class to only derived classes and the class in which it is defined, and not any other class defined within the same package?

protected specifier in C# provides this feature, and uses another specifier protected internal to provide feature equivalent to protected in JAVA

does an added specifier specifier is missing in JAVA?

[469 byte] By [enterneoa] at [2007-11-27 10:10:32]
# 1

> is there a way i can restrict a member in my class to

> only derived classes and the class in which it is

> defined, and not any other class defined within the

> same package?

There's no good reason to do that. Packages are not just namespaces. They're intended to be more closely related than subclasses. They're almost like an extension of he class.

jverda at 2007-7-13 0:47:25 > top of Java-index,Java Essentials,New To Java...