sir,i have tried to execute a simple program but could not as it is showing run time error,please provide me a simple short program on inheritance which i can run and see what is the actual problem in my program,
try with this code, if you are still facing problem to run it than let me know.
class person1
{
int age;
String qualification;
void assign()
{
age=25;
qualification="B.Tech";
}
void output()
{
System.out.println("age of the engineer is"+age);
System.out.println("qualification of the engineer is "+qualification);
}
}
class SoftwareEngineer extends person1
{
}
class engineer
{
public static void main(String[]args)
{
SoftwareEngineer se=new SoftwareEngineer();
se.assign();
se.output();
}
}