Hi All,
Really which Bert and Kathy are reading this!!
I noticed in JDK6 u20 d@ protected behaves just like default access (package private). Instance data with protected access can't be accessed outside of their package even NOT by a class instance member that has is-a relationship with the hosting class
Please anyone d@ has worked with JDK6 u20 should verify this
e.g
package here;
public class Utility
{
protected int resource;
}
package one;
import here;
public class
Test extends Utility
{
public static void main(
String[] argv)
{
Utility ut = new Utility();
ut.resource = 67; // ERROR resource can't be accessed outside of its package
}
}