title: How does `Java` `List` method `size` work?
body: <p>In Java, there is a <code>List</code> interface and <code>size()</code> method to compute the size of the <code>List</code>.</p>
  
  <ul>
  <li>When I call <code>List.size()</code>, how does it count?</li>
  <li>Is it counted linearly, or the count is determined and just the value is returned back when <code>size()</code>?</li>
  </ul>