title: Finding lengths of a string in an ArrayList using ArrayList as a return value of a method
body: <pre><code>import java.util.ArrayList;
  
  public class LengthsOfStrings 
  {
      public static ArrayList&lt;Integer&gt; lengths(ArrayList&lt;String&gt; list) {
          ArrayList&lt;Integer&gt; lengthList = new ArrayList&lt;Integer&gt;();
  
          list.length();
          return lengthList;
      }
  
      public static void main(String[] args) {
          ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
          list.add("Ciao");
          list.add("Moi");
          list.add("Benvenuto!");
          list.add("badger badger badger badger");
          ArrayList&lt;Integer&gt; lengths = lengths(list);
  
          System.out.println("The lengths of the Strings: " + lengths);
      }
  }
  </code></pre>
  
  <p>I was thinking something like this, but I don't know what to fill in the <code>list.length();</code> with.</p>