Your problem is that you don't have enough lines of code which produce output. Add some more of them and you'll be able to see what your program is doing and thus figure out how to change it. Example of code you should add:
data = inFile.next( );
num = inFile.nextInt ();
// try putting a System.out.println(num); here
sum = + num;
// and a System.out.println(sum + " " + num); here......... this way you might be able to see why it's not coming out right......
When you do things right, people won't be sure you've done anything at all.
Joined: Sep 16, 2009
lol += is what i needed. i found it out.
subject: when i run my virtual machine just keeps going, but no output.