Java - pass in array values
<p>Is it possible to pass in array values?</p>

<pre><code>test ([1, 2, 3, 4]);
</code></pre>

<hr>

<pre><code>public void test(int[] foo) {
    for (int i : foo) {
        System.out.println(i);
    }
}
</code></pre>

<p>Outputs:</p>

<pre><code>1
2
3
4
</code></pre>
