This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.