Stupid question deleted.

Can we please see more of the code - those two lines don't show enough to create or diagnose a problem. Ideally, post a small runnable program that demonstrates your problem.

There was just something else in my coding causing it to go in a never ending loop! yes scanners should normally allow string variables to parse into them for anyone else who needed to know this...