Watch out for these problems when submitting homework:

If you submit, get an error message, and resubmit rather soon, you may see the old error message again because you didn't press "Refresh" and your browser is showing you the cached version of that page.


If you are using Eclipse: it automatically puts a "package" command in your file, which you will have to remove before submitting. Otherwise the compiler will look for your code in a directory that doesn't exist on the server and you'll get a compilation error.

Does it say TestSomething can't compile, where Something is the assignment name? That does not mean that the system isn't working. It might mean, for example, that you didn't spell the name of the required method correctly; or that you gave it the wrong type of input or return value, so that the testing program can't find what your class is supposed to supply, and hence can't compile. Occasionally it might mean that the testing code hasn't been posted yet, but if you see others have successfully submitted, that's not what it means.

Are you getting the right result on your computer but not when you submit? One possible cause is that you failed to initialize your variables in your method. The testing code creates one instance of your class and calls your method repeatedly on different examples, so it is not enough just to initialize your variables in the class constructor. You should make a habit of writing your own testing code so that it, too, tests several examples using the same instance of your class.

Another possible cause of getting the right result locally but not on the server is using == instead of .equals(...) to test for equality between two class objects (such as Strings or BigIntegers). (The two references you are comparing in your own main may actually be equal as references, while the server's main may be testing two objects with unequal references, but which are actually equal objects.)