Hello everyone, I need some help here. So this program takes an input file that I will post at the bottom with ints.
Assignment: Write a program that inputs a list of numbers that are arranged into groups of various sizes. The program outputs the sum of the numbers in each group. Each group starts with a one-line descriptive phrase. The phrase can be anything that is not a number. Some groups may have zero number in them.
Problem: Everything runs fine at first and I get my first group sum of -44 which is correct but then i get this
I'm getting an StringIndexOutOfBoundsExceptionString index out of range: 0 at java.lang.String.charAt(unknown source)
Put some System.out.printf calls in for debugging. You may be getting a 0-length line. That is an obscure problem, which isn't well described in the books I have read. Ignore the rants, and have a look at what one of our more disreputable members said about that problem last year.