2
println(
"""
    |Enter your name:
    |""".stripMargin)

val myname =scala.io.StdIn.readline()

I want the input of the user to appear as ***** so that its not visible to other users.

Siddharth Seth
  • 643
  • 5
  • 18
kaps
  • 21
  • 2
  • 1
    Maybe this would help https://stackoverflow.com/questions/12076165/how-to-obscure-scanner-input-text. Although this does not appear as asterisks, it shows nothing. – AminMal May 11 '22 at 10:19
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 11 '22 at 14:53
  • The application is asking the users to enter their usernames and passwords in the terminal, l want to makesure the password input is not visible to anyone looking on the screen. – kaps May 11 '22 at 19:44

0 Answers0