title: How can we getting elements index wise in LinkedList As it is said it stores Randomly
body: <p>It's said indexes in <code>LinkedList</code> Stored randomly but when i am trying the get the index in an &quot;LinkedList&quot; every time i am getting the same index. Then it's confusing how come it stores randomly  , here is below simple code</p>
  <pre><code>public static void main(String[] args) {
          
          
          LinkedList&lt;Integer&gt; list = new LinkedList&lt;Integer&gt;();
          list.add(1);
          list.add(2);
          list.add(3);
          list.add(4);
          list.add(5);
          
          System.out.println(&quot;Index At 2:::&quot;+list.get(2));
          
          
          
          for (Iterator iterator = list.iterator(); iterator.hasNext();) {
              Integer integer = (Integer) iterator.next();
              System.out.println(integer);
              
          }
  }
  My output Every Time
  
  
  
  Index At 2:::3
  1
  2
  3
  4
  5
  </code></pre>