I couldn't do anything with the above statement, Stan.....This is where I'm at right now. I would be happy if I could get the integers seperated by a space in the particular file to be summed and output to system.out. What gets me is I can't find any references to adding integers stored in a file in my textbook (How To Program Deitel / Deitel)
This is what I'm working with:
import java.io.*;
import java.util.*;
import java.lang.*;
public class ProcessFiles
{
public static void main(String args[]) throws IOException
{
/*FileReader fr1 = new FileReader("E:\\My Documents
\\OCC\\JavaII\\"
+ "Programs\\ProcessFiles\\dataFiles \\ascii1.txt");
BufferedReader br1 = new BufferedReader(fr1);
String s1 = br1.readLine();
StringTokenizer st1 = new StringTokenizer( s1 );
//I know this is wrong, I would like to use valueOf but
// have been unsuccessful...a subtle hint is all I ask.
while (st1.hasMoreTokens())
{
String
word = st1.nextToken ();
if (word.length() > 1 )
System.out.println("The sum of all integers
is: " + word);
br1.close();
}
}
}