How to represent Array In desired format in java : <p>I am getting array values as follows in JSP servlet page. </p>

<pre><code>String[] JsonEvents = request.getParameterValues("events[]");
</code></pre>

<p>I just want to know how to change it to the following type.(Lets say "Apple" and "Orange" are the element of received Array)</p>

<pre><code>String[] JsonEvents = new String[] { "Apple", "Orange" };
</code></pre>

<p>Please help me. </p>
