carlolm
carlolm

Reputation: 277

Scala: Import scala.io.StdIn.readLIne -- error importing

I am getting an error if I import readline, as follows:

import scala.io.StdIn.{readline, readInt} =>

error: value readline is not a member of object scala.io.StdIn
import scala.io.StdIn.{readline, readInt}

If I don't import this, I get a deprecated message:

warning: there was one deprecation warning (since 2.11.0); re-run with -deprecation for details
one warning found

I get no errors if I use the fill path to the function:

var x = scala.io.StdIn.readLine.toInt

Let me know if you can help me resolve the import. Thanks.

Upvotes: 0

Views: 3933

Answers (1)

pedrofurla
pedrofurla

Reputation: 12783

A very tiny overlook:

import scala.io.StdIn.{readLine, readInt}

readLine has an upper case L

Upvotes: 3

Related Questions