It's a bit confusing to see an empty, unused class called "Key", followed by another class called "Key_Override" which does not actually override the class Key. Or have any relationship with that class. At all. Or any other class. At all. Fortunately this stuff appears to be totally unrelated to anything. Perhaps next time, you could just leave this stuff out.
Torsten Oppermann wrote:
Um, OK. I don't know if it matters, but it's distracting me: why divide by 2 here? Aside from creating additional bug possibilities later in the code, I mean.
Torsten Oppermann wrote:
I would guess that the problem is with using == rather than .equals() in line 49 (in your original post). Objects (e.g. Strings) should usually be compared with .equals(), not ==. Unless you're sure you know what you're doing.