is there any way to display •••'s when a user is typing in the console? My program has a user entering a password for a MySQL database but I want it to show •••'s instead of their password when they type.
            Asked
            
        
        
            Active
            
        
            Viewed 384 times
        
    2 Answers
2
            
            
        You can use Console.readPassword() to disable echoing. I don't think there's any way to get a substitute character without JNI though.
 
    
    
        markspace
        
- 10,621
- 3
- 25
- 39
-1
            
            
        Dont know about showing "." But instead you can use
char[] password = console.readPassword("Password? ");
to input password without echoing on screen.
- 
                    Please post the code to this answer so in the event the linked page isn't available this answer will still be useful. – Fencer04 Sep 13 '16 at 17:05
- 
                    
 
     
    