Because Java’s if does not return a value,
you cannot say:
return if (x < 0) "-" else "+";
This would have been a nice place to make an analogy to the question mark operator, since a java programmer would probably be familiar with it and it allows you to write: return if (x < 0) "-" else "+";
as return x < 0 ? "-" : "+";