ok lets break this problem down into a few separate steps, each of which should be fairly easy to solve.
Firstly you need to read in the CSV file. This is nice and simple and there are plenty of tutorials etc for reading files in Java (eg http://www.tutorialspoint.com/java/java_files_io.htm).
Next you need to store this somewhere. This is probably the part that will require the most thought since whatever data structure you use will affect how you sort it. You have stated that you need to store the rows in an array or arraylist (from your comments), an arrayList will be slightly easier as it provides some methods to help with sorting. The rows themselves can be represented in a number of different ways, for example a Map or, as @RC suggests, a custom object.
Finally you need to sort your array (or arrayList). Your question suggests that you already have a sorting algorithm so depending on the interface for this you may be able to pass your unsorted collection directly into it. Alternatively, if using an ArrayList, you can use the sort() method. This requires a Comparator, also as suggested by @RC. This basically just outlines the rules to follow when sorting, and these rules are then applied by the sort() method.
So, long story short, just break the problem down, decide on what data structures to use, and from there you should be able to find plenty of tutorials online to guide you through each individual step.
This seems like a homework question so I don't want to write any code for you, but hopefully this points you in the right direction.