0

In my previous post I asked the forum to help me make a race with an existing program I had made. I figured out a way to do this but now I got an error and I cannot solve it.

If you need any additional information just ask ^_^

Attachments java_error_help.JPG 188.23 KB
2
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by white feather
0

does your vehicleCMD class have a constructor that takes in a String as a param?

I changed the classes' & objects' names because now they make more sense(:

Here is the code concerning the constructors. Again, if you need more information just ask.

Thanks, Jean

Attachments java_error_help.JPG 283.7 KB
0

You have the keyword void in your constructor for the carCMD. Remove that and it should work

public carCMD(String carName){
        this.carName = carName;
}
0

You have the keyword void in your constructor for the carCMD. Remove that and it should work

public carCMD(String carName){
        this.carName = carName;
}

Thanks for your help :)

I managed to finish up the program.
Here is a screenshot of the console.

Attachments Java_-_Race_[Solved].JPG 206.68 KB
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.