Add value to first index of value 0 in Java array : <p>If I have an array of zeros [0,0,0] how do I insert a given value to the first index that is valued 0.</p>

<p>So first off the value 3 will go into index 0 giving me [3,0,0]</p>

<p>Then the second value 8 will go into index 1 giving me [3,8,0].</p>

<p>How do I go about this?</p>
