My brain is kinda fried from fiddling with an evil UNIX program, but I think that if you want to sum,
you do this:

int x = scanFile.nextInt();

although if that won't work, try...