<HTML>
<HEAD>
<TITLE>Using Restricted Access</TITLE>
</HEAD>
<BODY>
<H1>Using Restricted Access</H1>
<%!
javax.servlet.jsp.JspWriter localOut;
class BaseClass
{
protected void start() throws java.io.IOException
{
localOut.println("Starting...<BR>");
}
}
class DerivedClass extends BaseClass
{
public void drive() throws java.io.IOException
{
localOut.println("Driving...<BR>");
}
}
%>
<%
localOut = out;
out.println("Creating an DerivedClass...<BR>");
DerivedClass a = new DerivedClass();
a.start();
a.drive();
%>
</BODY>
</HTML>
|