Y
Hacker News
new
|
ask
|
show
|
jobs
by
hyperpape
4654 days ago
It's not necessary in Java (though it's still a common habit). Assignment to a non-boolean is impossible in an if statement in Java, and you can make the compiler warn you about accidental assignments.
1 comments
rbanffy
4653 days ago
Still, assigning a boolean rather than comparing it is still possible and, possibly, a source of bugs.
link