this global variable must go! Pass this data via parameter.
this text was my last nitpick.
For hours I studied my code, my books,
got nice ideas for solving other nitpicks, but not for this one. Then I studied other SortNames help cries on this site, but nobody had problems similar to mine! Or so it seems.
The assignment says: "Load an ArrayList with Strings from a text file of names".
Well, I did this, right in the second line of code after my "public class SortNames.."
saying:
Then I let the add() method of TextFileIn fill up this list.
Then the main method (and other) take care of sorting and printing the stuff.
If I have no ArrayList first thing, how can I fill it then??
WHAT parameter could pass it, and how??
Usually I always have SOME idea, but this time I feel like giving up on this.
A leeettle tiny hint would be highly apreciated.
Thank you, experienced folks.