0

my groovy script code is like this:

import console.*
def data=Console.readInteger()
println "data:${data}"

But when I ran it, I got exception:

Exception thrown groovy.lang.MissingMethodException: No signature of method: static java.io.Console.readInteger() is applicable for argument types: () values: []

How to read an integer from basic input? Thanks a lot?

Julian20151006
  • 191
  • 6
  • 12

0 Answers0