title: how sum of 2 arraylist?
body: <p>i got below mentioned error when run code:</p>
  
  <pre><code>Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
      at java.util.LinkedList.checkPositionIndex(Unknown Source)
      at java.util.LinkedList.addAll(Unknown Source)
      at Collection.Dynamycmaasiv.Collecktionaddlist.main(Collecktionaddlist.java:36)
  </code></pre>
  
  <p>code</p>
  
  <pre><code>public static void main(String[] args) {
      LinkedList&lt;Integer&gt; num = new LinkedList&lt;Integer&gt;();
      LinkedList&lt;Integer&gt; numodd = new LinkedList&lt;Integer&gt;();
      LinkedList&lt;Integer&gt; numeven = new LinkedList&lt;Integer&gt;();
      LinkedList&lt;Integer&gt; sumoffevenandodd = new LinkedList&lt;Integer&gt;();// help
                                                                          // me
                                                                          // to
                                                                          // solve
  
      for (double i = 0; i &lt; 50; i++) {
          num.add((int) i);
          if (i % 2 == 0) {
              numeven.add((int) i);
          } else {
              numodd.add((int) i);
  
          }
      }
  
      System.out.println(num);
      System.out.println("-----------------");
      System.out.println(numodd);
      System.out.println("-----------------");
      System.out.println(numeven);
  
      for (int i =0; i&lt;numeven.size(); i++){
  
          sumoffevenandodd.addAll(numeven.get(i)+ numodd.get(i), null);
      }
  
      System.out.println(sumoffevenandodd);
  }
  </code></pre>
  
  <p>}</p>