Practice Quiz on Constructing and Looping through an ArrayList

  1. Declare a variable named words that is an ArrayList of String values, and initialize it to be an empty list.

  2. Add three strings to the ArrayList you created above: “Sherlock”, “Holmes”, and "Watson".

  3. Write a for loop that prints the length of each string in the ArrayList you created above.