I keep getting cannot find symbol error when trying to create the subclass h object in my main code. Would someone please be able to help ? Thanks.
It seems like the main program is accepting the inhtt object but when I try to call h object it says that it cannot find symbol and asks me to create the h object.
public class inhtt {
//class methods
public int thing;
public int stuff ;
public int otherstuff;
// constructor based on parameters
public inhtt( int x, int y, int z){
thing = x;
stuff = y;
otherstuff = z;
}
void showmain (){
System.out.println("thing is " + thing);
System.out.println("stuff is " + stuff);
System.out.println("otherstuff is " + otherstuff);
}
public class h extends inhtt {
int beard;
h( int x, int y, int z, int a){
super(x,y,z);
beard = a;
}
void shownewa(){
System.out.println("beard is" +beard);
}
}
}
* @author New User
*/
public class runraffharsh {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
inhtt base = new inhtt(1,1,1);
base.showmain();
h = new h(1,1,1,1);
h.shownew();
// raff beard = new raff(1,1,1,1);
// beard.showbeard();
//
}
}