I wanted to see if someone could shed some light on this for me. When I was using the Checkstyle plugin for Eclipse, I got a warning message on the following statement (not exactly this, but this form):
if (x != y)
{
do();
}
Why is this a problem?
Edit: I apologize, I should have been more clear with my question. Thanks very much for your answers; they actually helped me with a completely different problem.
The warning that I got recommended that I not use a test of the form "x != y", but instead use a test of the form "x = y". I'm wondering why one would be better than the other.