First of all.
We should know what KbdInput class does, in particular one of its methods, readInt().
it does not return an int as expected but an empty String
You create a StringTokenizer of the String taken as input, i.e. String line
But you don't go through its tokens!!!
So the loop
will probably never end
Can you post KbdInput.readInt() method?