title: List is broken and not adding
body: <p>The code is originally written by @Arvind.
  I give credit.
  I will just use I as a noun.</p>
  
  <p>I have four classes, Item, Store, Customer, Online.</p>
  
  <p>Whenever I found an item in Online class, </p>
  
  <p>I want to added via addingitem() from Store class.</p>
  
  <p>I am using Link so I can store, delete multiple items.</p>
  
  <p>But the things is that when I try to store it. </p>
  
  <p>I work perfectly with debug to itemLists.add();</p>
  
  <p>but when trying to look what is in the itemLists with debugger,
  the size is zero and nothing is in there.</p>
  
  <p>I don't know why.</p>
  
  <p>I need a temporary list or something else to store multiple strings. 
  I am using list because it can be added, deleted and printed.</p>
  
  <p>Let say if I add this item, because it exists.</p>
  
  <p><code>001A:GTA</code>. </p>
  
  <p>Ok, I will added another item , </p>
  
  <p><code>001C:The last of us</code></p>
  
  <p>it should not only store that but when I want to view that what I have stored. The result should be.</p>
  
  <pre><code>001A:GTA
  001C:The last of us
  </code></pre>
  
  <p>Can someone explain to me?
  Thanks.</p>
  
  <pre><code>import java.util.LinkedList;
      import java.util.Objects;
  
      class Item {
          private String code, name;
  
          public Item(String code, String name) {
              this.code = code;
              this.name = name;
          }
  
          public String getName() {
              return name;
          }
          public String getNumber(){
                  return number;
         }
  
          @Override
          public String toString() {
              return name + " : " + code;
          }
  
          @Override
          public int hashCode() {
              return Objects.hash(name, code);
          }
  
          @Override
          public boolean equals(Object obj) {
              Item item = (Item) obj;
              return name.equals(item.name) &amp;&amp; code.equals(item.code);
          }
      }
  
      class Store {
          private LinkedList&lt;Item&gt; items = new LinkedList&lt;Item&gt;();
          private String name, number;
  
          public Store(String name, String number) {
              this.name = name;
              this.number = number;
          }
  
          public String getName() {
              return name;
          }
  
          public void addItem(String code, String name) {
              items.add(new Item(code, name));
          }
  
          public LinkedList&lt;Item&gt; findItems() {
              return items;
          }
  
          @Override
          public String toString() {
              StringBuilder sb = new StringBuilder();
              for (Item item : items) {
                  sb.append(item.toString()).append(System.lineSeparator());
              }
              return sb.toString();
          }
  
      public List&lt;String&gt; addingitem(Item item){
              List&lt;String&gt; itemLists = new ArrayList&lt;&gt;();
              itemsList.add(item.getName() + item.geNumber() + “ added”);
              return null;
          }
  
          public void viewStore() {
              System.out.println(name + " " + number);
          }
  
          /**
           * Searches the item in the store using the search string
           * 
           * @param The string combining the code and name in the format "code:name:"
           * @return Returns the matching Item. If the item is not found, null is returned
           */
          public Item findItem(String strItem) {
              String[] data = strItem.split(":");
              if (data.length &lt; 2) {
                  return null;
              }
  
              Item searchItem = new Item(data[0], data[1]);
  
              for (Item item : items) {
                  if (item.equals(searchItem)) {
                      return item;
                  }
              }
  
              return null;
          }
  
          /**
           * Searches the item in the store using the name of the item
           * 
           * @param The name of the item
           * @return Returns the matching Item. If the item is not found, null is returned
           */
          public Item findItemByName(String itemName) {
              for (Item item : items) {
                  if (item.getName().equals(itemName)) {
                      return item;
                  }
              }
              return null;
          }
      }
  
      class Customer {
          private LinkedList&lt;Store&gt; stores = new LinkedList&lt;Store&gt;();
  
          public Customer() {
              stores.add(new Store("Game", "1"));
              stores.add(new Store("Grocery", "2"));
  
              stores.get(0).addItem("001A", "GTA");
              stores.get(0).addItem("001B", "GOD OF WARS");
              stores.get(0).addItem("001C", "THE LAST OF US");
  
              stores.get(1).addItem("002A", "Sandwich");
              stores.get(1).addItem("002B", "Cup Noodle");
              stores.get(1).addItem("002C", "Ice Cream");
          }
  
          public LinkedList&lt;Store&gt; getStores() {
              return stores;
          }
  
          public void viewStore() {
              for (Store store : stores)
                  store.viewStore();
          }
  
          public void viewItems() {
              for (Store store : stores) {
                  for (Item item : store.findItems()) {
                      System.out.println(item);
                  }
              }
          }
  
          /**
           * Searches the item in all the stores related to the customer using the search
           * string
           * 
           * @param The string combining the code and name in the format "code:name:"
           * @return Returns the matching Item. If the item is not found, null is returned
           */
          public Item findItem(String strItem) {
              String[] data = strItem.split(":");
              if (data.length &lt; 2) {
                  return null;
              }
  
              Item searchItem = new Item(data[0], data[1]);
  
              for (Store store : stores) {
                  for (Item item : store.findItems()) {
                      if (item.equals(searchItem)) {
                          return item;
                      }
                  }
              }
              return null;
          }
  
          /**
           * Searches the item in all the stores related to the customer using the name of
           * the item
           * 
           * @param The name of the item
           * @return Returns the matching Item. If the item is not found, null is returned
           */
          public Item findItemByName(String itemName) {
              for (Store store : stores) {
                  for (Item item : store.findItems()) {
                      if (item.getName().equals(itemName)) {
                          return item;
                      }
                  }
              }
              return null;
          }
      }
  
      public class Online {
          public static void main(String[] args) {
              Item item;
              String strItem, itemName;
              Customer customer = new Customer();
  
              // Test searching the item using the search string in a particular store e.g.
              // first store of customer
              Store store = customer.getStores().get(0);
              System.out.println("Searching item using search string in store, " + store.getName());
  
              strItem = "001A:GTA";
              item = store.findItem(strItem);
              if (item == null) {
                  System.out.println("Not found -&gt; " + strItem);
              } else {
                  System.out.println("Found -&gt; " + item);
                          store.addingItem(item);
              }
  
  </code></pre>