My program had a bug that resulted in a ClassCastException being thrown. I omitted the lines in my program that resulted in this exception, and made a few other small changes, but every time I run it, it appears as though the older version of the program is being run, since the ClassCastException is still thrown and the stacktrace refers to nonexistent lines in the program!
Any idea why this is? Restarting Eclipse did not help.
If Eclipse can not compile a class due to a syntax error, it will use the last compilable version to run, until the current one is fixed.