title: java equivalent to printf("%*.*f")
body: <p>In C, the printf() statement allows the precision lengths to be supplied in the parameter list.</p>
  
  <pre><code>printf("%*.*f", 7, 3, floatValue);
  </code></pre>
  
  <p>where the asterisks are replaced with first and second values, respectively.</p>
  
  <p>I am looking for an equivalent in Android/Java; String.format() throws an exception.</p>
  
  <p>EDIT: Thanks, @Tenner; it indeed works.</p>