Parameterized Strings in Java
<p>I find myself very frequently wanting to write reusable strings with parameter placeholders in them, almost exactly like what you'd find in an SQL PreparedStatement. </p>

<p>Here's an example</p>

<pre><code>private static final String warning = "You requested ? but were assigned ? instead.";

public void addWarning(Element E, String requested, String actual){

     warning.addParam(0, requested);
     warning.addParam(1, actual);
     e.setText(warning);
     //warning.reset() or something, I haven't sorted that out yet.
}
</code></pre>

<p>Does something like this exist already in Java ? Or, is there a better way to address something like this ? </p>

<p>What I'm really asking: <strong><em>is this ideal ?</em></strong></p>
