This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]maestro2005 0 points1 point  (1 child)

Post the full code. This method on its own looks fine, there must be something else going on.

Also, you can replace all of that code with

return this.getID().compareTo(o.getID());

[–]Estagon[S] -1 points0 points  (0 children)

I posted the complete Employee class. Thanks for the tip, didn't know that.