I want some help converting this Java code to an if/else statement.
public boolean equals(final Object obj) {
boolean result = true;
if (level != null ? !level.equals(log.level) : log.level != null)
{
result = false;
}
return result;
}
This is truly terrible code: It’s full of double negatives! No wonder you want to make it readable.
(I think) this is what it should be:
Note that parameter
objis ignored (?)