Le Jingle
2012-10-19 21:53:32
Hello, I'm curious how I go about looping through a Scanner input txt file, line by line for integer values only?
Ex.

I'm aware I need to loop (whether it be with or without arrays (I haven't covered array's but can't imagine them being all too different just because they're in java..) or simply integer summations for each line; How do I loop from # to #, line to line, given a Scanner object?
sumLine1 += file.nextInt(); ??
Ex.

I'm aware I need to loop (whether it be with or without arrays (I haven't covered array's but can't imagine them being all too different just because they're in java..) or simply integer summations for each line; How do I loop from # to #, line to line, given a Scanner object?
sumLine1 += file.nextInt(); ??
