Java. if statement inside String as function argument
<p>Is there a way to include a simple if statement inside a Java String passed as argument to a function, like the following example</p>

<pre><code>int TotalFiles = 3;
JOptionPane.showMessageDialog(frame, 
                     "Created " + TotalFiles + " file" + (if(TotalFiles&gt;1){"s"}) + ".");
</code></pre>