I am using a scanner to scan a text file and write out three fields to another text file. I need to sort the file based on the taxID and a deeper sort based on classcode. if the taxId is the same and the classcode is different then I need to increment the counter and print the line. If taxId and classcode is the same I simply need to put the acctNo in an array to be printed later. I am including my code. Any suggestions or help is appreciated.