I wouldn't name a String integer, it's too confusing, this looks like a class assignment so I would be remiss, in giving the store away, however, It would seem like Scanner was choosen for a reason (A Scanner breaks its input into tokens using a delimiter
pattern, which by default matches whitespace. The resulting tokens may then be converted into values of different types using the various next methods).
My question is this - did the instructor specify, delimiters, etc...
Hint a Scanner can be created from a line of text (String)
Hope this helps
Tom