Source Code : Using Inheritance
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Using Inheritance
<HTML>
<HEAD>
<TITLE>Using Inheritance</TITLE>
</HEAD>
<BODY>
<H1>Using Inheritance</H1>
<%!
javax.servlet.jsp.JspWriter localOut;
class vehicle
{
public void start() throws java.io.IOException
{
localOut.println("Starting...<BR>");
}
}
class automobile extends vehicle
{
public void drive() throws java.io.IOException
{
localOut.println("Driving...<BR>");
}
}
%>
<%
localOut = out;
out.println("Creating an automobile...<BR>");
automobile a = new automobile();
a.start();
a.drive();
%>
</BODY>
</HTML>
Thank with us