Pay attention to the list of files you are expected to submit. Under no circumstances should you ever turn in compiled object code (.class) files.
Be very sure you have the correct names on all files. In particular, note that Unix file names are case-sensitive: “foo.java” and “Foo.java” are not equivalent, as they are on some Windows file systems. If the names are wrong, your program will not compile. If it doesn't compile on the Unix system, it's wrong. “But I had it working on my home PC!” is not an acceptable excuse.
Do not change any other files provided with the assignment (except for your own temporary testing/debugging purposes). In particular, beware of changing interfaces! The instructor's test drivers may or may not be identical to the code provided with the assignment, but it will certainly assume that you have not altered the function names, parameter lists, or other visible interfaces. In the end, the files that you submit must compile with the original versions of the other files provided with the assignment.
Pay close attention to the expected format of the output. Output that is printed in a different order, in an incorrect format, has extra or missing characters, or in which you've inserted extra debugging information, is wrong.
If this seems a bit harsh, consider that, in the real world, programs must talk to each other, and to do that they must agree on I/O formats. Using an incorrect output format in those circumstances will not only break the communications path between the programs, but will earn you the enmity of your fellow programmers because management may suspect that it was their input code that failed rather than your output code.
In the Forum: