The compiler says you cannot use a ternary operator as a statement, which means a conditional method call in your case. It is only indented for conditional parameters, e.g. System.out.println(true?"true":"false");