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.

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

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.
Who is Participating?
shaveriConnect With a Mentor Commented:
check your class path variable...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.