+ 2

is there a way to ask for user's input without the Scanner-class?

I just wrote this code: https://code.sololearn.com/c581fS0jY93a/#java It works locally on my machine but on the playground it doesn't. It throws the error that scanner doesn't exist. I guess importing the Scanner-class from the utils library is not possible here. What are options to ask the user for their input?

3rd May 2017, 4:18 PM
Thanh Le
Thanh Le - avatar
1 Antwort
+ 2
BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); String s = input.readLine();
3rd May 2017, 4:24 PM
Jeth
Jeth - avatar