Call Java from Javascript and pass integer
<p>I use java to evaluate a javascript file. This is using java.lang.String.format and shall pass an integer, but I get the exception for "java.util.IllegalFormatConversionException: d != java.lang.Double". My passed value seems to be converted to double.</p>

<p>javascript:</p>

<pre><code>java.lang.String.format("%02d", 1 );
</code></pre>

<p>How can I enforce that the passed variable type is int?</p>
