I\'m creating this simple login code for an ATM machine.
You enter username and password and you logs in, that works just great. Since I\'m not connecting to a database or a
There's a special method Console.readPassword() for doing this, introduced in Java 6. You obviously couldn't run code like this on a real ATM, though! Swing has JPasswordField which lets you do this kind of masking in a GUI, and one could imagine a Swing-based ATM window.