Read a count and then that many words into an ArrayList<String>. Print the size, then the first word, then the whole list.
For the input 3 then red green blue:
3
red
[red, green, blue]
Printing the list itself shows it in square brackets with commas — that is what Java does automatically.