title: I cant seem to access parameters of my listed object
body: <p>So I have an Item class:</p>
  <pre><code>public class Item {
      public String itemName;
      public double value;
      List&lt;Item&gt; items = new LinkedList&lt;Item&gt;();
  </code></pre>
  <p>with such attributes. I have added new Items to my list like this:</p>
  <pre><code>items.add(new Item(itemName:&quot;Bread&quot;,value: 1.5));
  items.add(new Item(itemName:&quot;Water&quot;,value:1.25));
  .
  .
  .
  </code></pre>
  <p>I'm trying to access the value and calculate the sum of items which I have added to my Item list.But cant figure out how. Anyone can help?</p>