word (password) displays in asterisks - Console application

后端 未结 1 1357
刺人心
刺人心 2020-12-12 04:17

I am trying to write a program which will allow two players to play \"a guess word\" game as part of my learning curve in Java. When prompted, player 1 types in a word but t

相关标签:
1条回答
  • 2020-12-12 04:49

    The intuition that you should intercept input, save original data, and show it masked in the console. You can achieve that by separate thread working on it.

    Use this reference http://java.sun.com/developer/technicalArticles/Security/pwordmask/

    Magic happens in EraserThread class.

    0 讨论(0)
提交回复
热议问题