I was wondering if someone could recommend a better way to parse integer values from standard input.
Currently, I am using BufferedInputReader that returns the input in the form of a
string. I then pass the string to a StringTokenizer. I check each token using Integer.parseInt(tokenValue) . I am then putting the ints into an array for processing. I'm using an array instead of a vector because the Vector class wouldn't process ints and it seemed to be a hassle to convert to the Integer type.
If anyone has a cleaner way of going about doing this, please let me know.
Thanks!