title: How to set object value using List<Object> to a model class in java?
body: <p>how do add each property value in my model using List? Here is what i do</p>
  
  <p>here is my object :
  <strong>Item.java</strong></p>
  
  <pre><code>public class Item {
  
      private String code;
  
      private String name;
  
      private Integer qty;
  
      // skip the getter setter
  }
  </code></pre>
  
  <p>here is how i want to add the value from another class</p>
  
  <pre><code>List&lt;Item&gt; sBarang = new ArrayList&lt;Item&gt;();
  sBarang.add("");
  </code></pre>
  
  <p>How do I add each property value my Item.java?</p>
  
  <p>What I can do is something like this :</p>
  
  <pre><code>Item mItem = new Item();
  mItem .setCode("101");
  mItem .setName("Hammer");
  mItem .setQty(10);
  </code></pre>