This exception occurs when your java file is compiled using higher version of JRE and then the class file so created is executed at lower JRE.
In Ann's case, he has Java 1.6 at home, where he wrote the code and compiled. It worked fine at home. But at university where, he told on asking, Java 1.5 is available. So it ended having this exception.
Solution for this exception is recompiling the file with available version.
You can find more details at http://forums.sun.com/thread.jspa?threadID=5208126
Ann, thanks for sending query.