For the sort by last name output, does the name needs to be "firstname lastname"? Because, I swapped the 2 and sorted it. But not sure if the output needs to be reversed for each name.
Also when I compile my program, I got a note saying the program uses unchecked or unafe operations, recompile with -Xlint:unchecked for details. When I do recompile, it warns about my ArrayList.add and Collections.sort: ArrayList.add(<some
string>) and Collection.sort(<some arraylist>). According to the API, ArrayList.add(Element) and Collections.sort(List<T>).
This makes me wonder isn't an arraylist a list and can string be element? If not to either, how to ensure it is a list or element respectively? casting? Any help on this is appreciated. Thanks