I am reading a newline-separated text file into a String-array.
Since I know the delimiter will always be \n, I should be able to append each word to a StringBuilder, then split it using the delimiter.
Simply put, which method should I use and why?
Method A:
1. Create an ArrayList (or another more suited Collection)
2. Append each row to the list
3. Return list.toArray()
Method B:
1. Create a StringBuilder
2. Append each row to the builder
3. Return builder.split("\n")