Extracting from an array and setting it inside an Object in java
<p>I am extracting an array of data and setting those data inside an Object in Java .</p>

<p><strong>I don't know, after getting the data from an array, how can I set this into an Object ??</strong></p>

<p>please have a look at the code below:   </p>

<pre><code>public class Legform implements Serializable {

    private SecurityType securityType;

    public SecurityType getSecurityType() {
        return securityType;
    }

    // As well as a setter Method also present
}
</code></pre>

<p>I am extracting this LegForm Object (the above one) here as shown from another java class :</p>

<pre><code>Legform[] legdata = orderform.getLeg();
</code></pre>

<p><strong>After looping throught this data, I need to set them inside another object called Leg  (a Java class)</strong></p>

<pre><code>for(int i = 0; i &lt; legdata.length; i++) {
    System.out.println(legdata[i].getSecurityType());
    // Here do i need to set the data into  the Leg Object 
}
</code></pre>

<p><strong>I need to set this extracted  information to a Leg Object 
The Leg Object is shown below :</strong></p>

<pre><code>public class Leg
{
  public String securityType;

}
</code></pre>

<p>could anybody help me please?</p>
