The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Help With I/O Exception Handling!

I am new to java programming and I need help with an assignment: I have most everything figured out, but I am stuck with a particular issue listed below. Here is what I am trying to accomplish and the issue I am having, I need to:

Basically I the totals are adding up correctly, but for some reason I can not get rid of the first 101 (101: 500000) and the first 107 (107:1000000.0). What can I do to remove those particular lines, but keep everything else as is? Any help on this would be appreciated! The current code is below and attached as a zipped project.

Where you have it now, the output string is being built incrementally, including the incomplete results. If you move the loop to just before the return statement in the aValue() method, the results will be improved.