I have made package and used all access modifiers for fields.
In super class I have put,
private String lp = "MH-01-1234";
public String make = "Hero";
String model = "Honda";
protected int year = 2007;
The super class is put in "user" package and subclass is put in
"user.java2" package.
I tried to access "year" in sub class but could not. The compilation error it shows is "the field 'year' is protected in parent class" If disable this usage other things work fine.
Kindly guide.
Thanking you
yours
K S Hegde.