53.2k views
2 votes
Please help with this error message

Please help with this error message-example-1
User Gudwlk
by
4.9k points

1 Answer

3 votes

This likely has nothing to do with your for loop. Before we get into the error, let's discuss arguments.

Your methods are given arguments when you declare them. For instance, your shuttle method has two arguments.

public void shuttle(int spaces, int beepers){

}

spaces and beepers are the two arguments. When you call these methods, for instance,

shuttle();

You must include the arguments.

shuttle(1,2);

You have these errors because you're not supplying the methods with arguments.

User Tsouchlarakis
by
4.6k points