title: Why equals return false in this situation?
body: <p>Here is the default JDK 8 implementation of AbstractList.equals()</p>
  
  <pre><code>public boolean equals(Object o) {
      if (o == this)
          return true;
      if (!(o instanceof List))
          return false;
      ListIterator&lt;E&gt; e1 = listIterator();
      ListIterator e2 = ((List) o).listIterator();
      while(e1.hasNext() &amp;&amp; e2.hasNext()) {
          E o1 = e1.next();
          Object o2 = e2.next();
          if (!(o1==null ? o2==null : o1.equals(o2)))
              return false;
      }
      return !(e1.hasNext() || e2.hasNext());
  }
  </code></pre>
  
  <p>I have following code :</p>
  
  <pre><code>public static void main(String[] args) {
  
          List list = new LinkedList&lt;List&gt;();
          List innerList = new LinkedList&lt;List&gt;();
          list.add(innerList);
  
          System.out.println(list.equals(innerList));
      }
  </code></pre>
  
  <p>In my opinion the two lists here are not equals and it should return false. And the compiler return false. My question is why? In the last line 
  return !(e1.hasNext() || e2.hasNext());</p>
  
  <p>e1.hasNext() is false and e2.hasNext() is false so overall it should return true. Why it return false ?</p>