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.
posted 10 years ago
You should do it in two passes. First read the file and add all mail elements in the tree set. Second iterate over the tree set to write to the second file.