Scanner (java.util.scanner) doesn't seem to be working?

Recently I’ve been trying to experiment with user input in processing, but nothing seems to be working. I’ve tried multiple websites but none of them have given me and answer that works. The problem is that when I run the code Processing refuses to acknowledge the fact that I am typing on the keyboard. Like, when I start the program and type, nothing shows up in the console. It would be a huge help if somebody could tell me what’s going on. Thank you very much!

Code:
import java.util.Scanner;
Scanner kb = new Scanner(System.in);

println(“What do you want to say?”);
String k = kb.nextLine();
println(k);

Hey,

I think that the Processing console is not made for using the java.util.Scanner functions as it’s not interactive.

The solution is to use this :

1 Like

http://Studio.ProcessingTogether.com/sp/pad/export/ro.9$Bjf6i21oXBw

2 Likes