Why are you trying to subtract two objects? Only primitive data can use arithmetic operations.

EDIT: Some irrelevant criticism:

1. All the constructors should be together.
2. Use an IDE to write your source code (Eclipse, NetBeans, Notepad++, check out this list: What are you using to write your code? ) so the indentation isn't arbitrary.

Last edited by Lil_Aziz1; 06-23-2010 at 06:39 PM.

"Experience is what you get when you don't get what you want" (Dan Stanford)"Rise and rise again until lambs become lions" (Robin Hood)

Put it this way, your bit of code there is the equivalent of subtracting one Bicycle from another Bicycle.

ETA: Stab in the dark here, but are you actually supposed to be comparing the two objects, temp.el and this.el? In which case you should be doing temp.el.compareTo(this.el). Though I am a bit confused about what this class is supposed to be for...but that's another story.