interleaving floats and strings in java
<p>I need to interleave 2 array of floats , floats, strings and put them in a list.</p>

<pre><code>float[] array1;
float[] array2;
float value1;
float value2;
string name1;
string name2;
</code></pre>

<p>at the output something like:</p>

<pre><code>{array1[i], array2[i], "name1", value1, value2, "name2",  value1, value....}
</code></pre>

<p>is this possible in java?</p>

<p>ok I'm trying this but it wont work:</p>

<pre><code>static Object[] dumoToCurve(final float[] x, final float[] y)   {
    final Object[] output = new Object[x.length * 2];
    float value= 1;

    for (int i=0; i &lt; x.length; i++){

        output[i &lt;&lt; 1] = x[i];
        output[(i &lt;&lt; 1) + 1] = y[i];
        output[(i &lt;&lt; 1) + 2] = "b0";
        output[(i &lt;&lt; 1) + 3] = x[i]+value;
        output[(i &lt;&lt; 1) + 4] = y[i]+value;
        output[(i &lt;&lt; 1) + 5] = "b1";
    }

    return output;
}
</code></pre>

<p>do I need to cast? how?</p>
