Java Question mark inside println()
<p>I'm trying to make a program that solves equations, i want the answer to be displayed in the right way, if the number is negative, to display -x and not +-x,
for example,
Eq1: 4x-3 and not 4x+-3, but when it is positive to display 4x+3. I can't use the plus sign inside the quotations.
I wanted to use the ? : operator. 
I tried something like this</p>

<pre><code>System.out.println("Eq1: "+ ((a11&gt;0) ? (+ "+" + (int)a11) : + (int)a11) +"*x1+");
</code></pre>

<p>This line is supposed to print the negative number (i.e. it will be -2*x1) and if it's positive it should display the + sign and add the number, but it gives me an error around the + "+" +</p>

<p>Any thoughts? Thanks!</p>
