+ 1
how to input as asterisk in Java
I like to know how to accept input like passwords/ pin codes as asterisk instead of seeing the the characters eg. Phy1233, on the screen. Want to see ********, which represents the same characters. class password { Public static void main (String args[]){ System.out.print(“Enter your password: ”); (Input code:............... please thanks); } }
2 ответов
+ 1
I think you can't do this if you want to enter password from terminal.. You can use some java libraries as Swing or JavaFX to enter the password using textfields
They give an opportunity to hide a password
+ 1
ok any code simple code to assist,
am use “JOptionPane library”. thanks