You want to collect all “short” words in an array of words, that is, words with at most three characters. Since you don't know in advance how many short words there are, collect them in an array list, not an array.

For example, if you are passed an array containing the words

"Mary", "had", "a", "little", "lamb"

you would return an array list containing the words

"had", "a"

Complete the following file:

import java.util.ArrayList; public class Words { /** Returns all short words (length <= 3) in an array of words @param words an array of strings @return an array list containing the short words in words */ public ArrayList<String> shortWords(String[] words) { // your work here } }