JavaScript to java, difference in Array Creation
<p>-In JavaScript you can use a generic value type <code>var</code></p>

<p>-In Java you must use explicit value types <code>double</code>, <code>int</code>, <code>String</code> etc</p>

<p>-In JavaScript the Array can have also heterogeneous values.</p>

<p>-In Java an array can have only values of the same kind,(for example all double or all String).</p>

<p>What happen if I write in JavaScript?</p>

<pre><code>var test[]=new Array();
test[1] = 16.98;
test[2] = 8.33;
test[3] = 5.31;
test[10] = 5.04;
</code></pre>

<p>The NOT-ASSIGNED index values are set to <code>0</code>, to <code>null</code>, or to <code>blankspace</code>?
Since all primitive values have a specific null value, for boolean false, for int 0 etc. If I want to port the above array form JavaScript to Java without errors I should know exactly the JavaScript policy for not assigned index values of the array.</p>

<p>Is correct to port the above sample in Java in this way?</p>

<pre><code>double test[]={0, 16.98, 8.33, 5.31, 0, 0, 0, 0, 0, 0, 5.04}
</code></pre>
