Why is this condition never satisfied ?

Posted by Patrick on Stack Overflow See other posts from Stack Overflow or by Patrick
Published on 2010-05-09T14:51:50Z Indexed on 2010/05/09 14:58 UTC
Read the original article Hit count: 112

Filed under:

I don't know why this condition is never satisfied: I'm comparing two ArrayList values, and it is always false.

if ( (Integer) results.get(rank) == (Integer) experts.get(j))

I'm debugging and I have exactly the same 2 values: 3043 and 3043 However it doesn't work.

thanks

© Stack Overflow or respective owner

Related posts about java