SuperAction类中修饰接口引用为什么要使用protected不用private
public class SupperAction extends ActionSupport implements ServletRequestAware,
ServletResponseAware, ServletContextAware {
private static final long serialVersionUID = 1L;
protected ServletContext context;
protected HttpServletResponse respose;
protected HttpServletRequest request;
protected HttpSession session;
正如上面这些代码所示,使用protected修饰HttpServletResponse ,HttpServletRequest,HttpServletRequest, HttpSession 接口引用为受保护属性,把这几个接口类的引用设为private(
private HttpServletResponse ;
private HttpServletRequest;
private HttpServletRequest;
private HttpSession;
)的时候,编译器会显示警告,为什么这里属性不能设为private?