title: How to get the number of elements in a linked list?
body: <p>I have a method called getLength</p>
  
  <pre><code>    public int getLength(LinkedList&lt;Boolean&gt; numbers){
  
      int length = numbers.size();
      return length;
      }
  </code></pre>
  
  <p>So it passes in a linked list of boolean values and names it numbers. What I'm trying to do is just get the length of the linked list, how many elements there are in it.</p>
  
  <p>Am I using <code>.size()</code> correctly in that case?</p>