3

Some of my co-workers tend to add an empty else at the end of the if-else statement. (even though no logic is implemented there) Like so:

if(X)
{
... // some logic
}
else if(Y)
{
... // some logic
}
else if(Z)
{
... // some logic
}
else
{ 
;
}

what is the benefit of adding the last else with ';' inside?

schanti schul
  • 681
  • 3
  • 14

0 Answers0