equivalent of String.Format() in Java
<p>I have this peace of code :</p>

<pre><code>String query = "SELECT * FROM utilisateurs WHERE pseudo = '" +  pseudo.getText()+ "' AND password = '" + new String(password.getPassword()) + "'";
</code></pre>

<p>My question is : isn't there any other method to concat these variables with the string ?</p>

<p>In C# I was using the method String.Format() method as : </p>

<pre><code>String query = String.Format("SELECT * FROM utilisateurs WHERE pseudo = '{0}' AND password = '{1}'", pseudo.getText(), new String(password.getPassword()));
</code></pre>
