I have been looking at this for a bit.. and I even put in the item = null to see what happens.. but this bit of code keeps getting stuck in an infinite loop. item is always equal to null and should kick out of the loop but it keeps running.
ArrayList<String> collection = new ArrayList();
Scanner arrayRead = new Scanner(new FileReader("SalesStar.txt"));
//iterate through file to put into Arraylist
String item = null;
while( item != null ) {
item = arrayRead.next();
collection.add(item);
}
arrayRead.close();
System.out.println(collection);
System.out.println(item);