This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I have a csv file that i'm reading in and I have got all the items in the file to get stored in a variable and the commas have been taken out with parsing. Each line in the csv file is a new person with personal attributes such as favorite pet. I would Like to sort this array of people by which pet is their favorite. I want all the people who like cats to be sorted out from the ones who like other animals and then alphabetized. I was thinking I could iterate through each line of persons and find their favorite pets in [X] part of the array but how do I take the complete line of the persons name who likes cats and attributes and store it in a new sorted array? Do I do something like this:
Yeah I figured that wouldn't work so well So I revised it a little. This is what I have now.
Joined: May 25, 2009
So I've just about got it complete except when the if statement is executed it adds a data row to other arrayList every time the item isn't CS. So I figured the best way to add a dataRow to the other arrayLists is only when CS isn't showing up in the 3rd column. So instead of doing something like this: