I have a method readData() that reads the data in correctly from a text chosen text file. And correctly outputs the results. An example of this file data is:
{Clothes}
- 15.00,Black, Female
- 30.00,Yellow, Female
- 50.00,Green, Male
- 90.00,Orange, Female
{Shoes}
- 75.00,Black, Female, Nike
- 55.00,White, Male, Adidas
{Clothes}
- 22.00,Blue, Male
- 32.00,Black, Female
The type of object or data identified through the {type of data}. And when I print out the data everything prints out. However, Clothes is printed out more than once because there is two different types of them. What I want to do is to sort the array list so that all the clothes objects appear under one heading and all the shoes objects appear under one heading. Is there any methods you recommend that would get me started on this? Thanks for the help.