How to take user inputs for Array through the parameter of the main function?
<p>I have this: </p>

<pre><code>class test {

    void main(int a[]) {

    }
}
</code></pre>

<p>What I basically want, is to get elements for my array this way, is it possible?</p>

<p><strong>Update:</strong></p>

<p>Okay, so many of you say that main can only take a string array, so here's the next problem:</p>

<pre><code>class test {

    public static void main(String[] args) {

    }
}
</code></pre>

<p>Now when I enter a number there at the method call, it gives me an error: </p>

<blockquote>
  <p>incompatible types: int cannot be converted to java.lang.String[]</p>
</blockquote>

<p><strong>Update 2:</strong> Alright, so I wasn't quoting them. XD</p>

<p>Thanks in advance!</p>