Stupid if else discussion i had
03:21 14 Jan 2026

I work in an environment that we had code review between ourselves to approve Merge request and i got a MR stopped because of this...

if(a) {
  code=a;
} else {
   if(b){
    code=b;
   }else{
    code=c;
   }
}

That i should be using

if(a) {
  code=a;
} else if(b) {
  code=b;
} else {
  code=c;
}

if i must put bracers in 1 line ifs why can i ignore the bracers on the else?

My colleage said that it's a different command...

java code-cleanup