title: How do I find a String list's length in Java?
body: <p>I'm new to Java, and I'm certain I'm not using lists properly, but I'm saving loads of user input responses as elements of a String list (as a side question, do I want a String list or an array list for this task?), and I later want to print out these elements at the end of the program. However, I want to do this automatically through a for loop, but I don't know the length of the list to make the for loop do its job. I tried</p>
  
  <pre><code>for(int j = 0; j &lt;= (results.length-1); j++){
  </code></pre>
  
  <p>where "results" is the name of the String list, but it's giving me the error "cannot find symbol." Is there any way to get the length of a String list in Java? And am I using the list thing properly, or should I be trying an array list instead? Any help would be greatly appreciated.</p>