inline if statement java, why is not working
The ternary operator ? :
is to return a value, don't use it when you want to use if
for flow control.
if (compareChar(curChar, toChar("0"))) getButtons().get(i).setText("§");
would work good enough.
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
Syntax is Shown below:
"your condition"? "step if true":"step if condition fails"