title: Merge two ArrayLists of Custom Object Type
body: <p>I want to combine two ArrayList into a single one. These ArrayLists are NOT the type of "String". Object type is a custom class.</p>
  
  <pre><code>private ArrayList&lt;NewsItem&gt; newsList;
  private ArrayList&lt;NewsItem&gt; eventList;
  private ArrayList&lt;NewsItem&gt; combinedList;
  </code></pre>
  
  <p>This is how I am trying to combine those two ArrayLists:</p>
  
  <pre><code>private void combineArrays() {
  
      if(newsList.size() &gt; 0){
          for (int i = 0; i&lt;newsList.size(); i++){
  
              NewsItem aBean = newsList.get(i);
              combinedList.add(aBean);
          }
      }
      if(eventList.size() &gt; 0){
          for (int i = 0; i&lt;eventList.size(); i++){
              NewsItem aBean = eventList.get(i);
              combinedList.add(aBean);;
          }
      }
  }
  </code></pre>
  
  <p>The app is crashing. What's the wrong with this approach?</p>