Of course not since methods are method not constructors. If you do not understand the difference then you need to do some revision.
Type: Posts; User: Junky
Of course not since methods are method not constructors. If you do not understand the difference then you need to do some revision.
I almost pointed you directly to the problem. Where is the constructor in the Truck class? It doesn't have one.
The error is on line 85 of the Truck class which according to you is: choice[choiceCount++] = w;
That means that the choice variable is null and has not been instantiated. "But it has been in the...
Copy and paste the exact error message.
The error message will tell on which line it occurs. Go to that line and examine all your variables to determine which is null. Then make sure it is not null before you try to use it.