Hi I have to write a program that takes in number of candidate and how many votes they got from the best to the worst. And I wrote two different classes to do that using a fileInputStream and another that uses the scanner class and storing it in the arraylist but the way the teacher has it in the text file is that some of the ballots are on different line so they will go like on one line while the ballots are on the other line. so its like this:
//this is how the text appears in the text file and I was wondering if I could get all
//the "votes" to look like the first one.
<v> 5 4 3 2 1
<v> 1 2 3 4 5
<v>
1
2
3
5
<v>
5
2
4
1
3