Link to home
Start Free TrialLog in
Avatar of theta
theta

asked on

New to Java. Getting an error in using parent abstract class.

I have an abstract class in one file. I am writing a subclass in another file.

FILE1:
package java.classes.mycode;
public abstract class Auto {....}

FILE2:
package java.classes.mycode;
class truck extends Auto {...}

When I try to compile my program, I get an error like:

Superclass java.classes.mycode.Auto of class java.classes.mycode.truck not found.
class truck extends Auto {
                            ^

What am I doing wrong?

Thanks in advance.
Theta.
ASKER CERTIFIED SOLUTION
Avatar of shaveri
shaveri

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial