what do you mean how do you do it with string? you've just done it there, except you changed it to an integer...
String inputStr;
inputStr = input.readLine();
that reads until you press enter, then returns the string
...
.... ?
and you use the [c0de] tags exactly the same as the [sh3ll] ones..