I need some help with java...

The_Other_One

VIP Member
If anyone could help me out, I'd be ever so greatful! Here's the deal, I have this program due tommarow and I can't for the life of me figure out what to do! :mad: And I don't procrastonate or anything, just this program's extra hard!(for me, anyway...)

So here's the deal, I have a text file I have to read. It has something like "UNCC 16" on each line. I have to read that then sort by the amount of wins...

OK, so I can get it to read the file, but that's about as far as I can get. I can get it into arrays, but then what? Do I use two arrays? How would I sort each? If I stick it all in one array, then how would I sort by team? Can I use the tokenizer to get to the next token? I tried but I don't know how to get that to work with the sort method...

Another less major problem I'm having is the array size. The text file could have basically any number of lines up to 64... If I set the array up to 64, then I have an error(unless I actually have 64 elements in there) Someone mentioned some other method...eh, I can't think of the name right off, but it's something we hadn't done in class yet so I wasn't sure how that'd go over...
 
If you post what you have so far, I can probably help. What you are being asked to achieve is a standard Bubble sort. Do a google on Bubble sort and you'll likely find a host of examples.
 
Back
Top