I\'m just starting to learn Groovy and I am experimenting in GroovyConsole.
Is there a way I can read user input? I have tried the code below but I get an error.
Your code works.
BufferedReader br = new BufferedReader(new InputStreamReader(System.in))
print "Input:"
def userInput = br.readLine()
println "You entered: $userInput"
Assuming you're on windows, the only problem is that the input is being read from the console in the background that is launched before groovyconsole.