Results 1 to 2 of 2
- 10-13-2010, 08:31 PM #1
Senior Member
- Join Date
- May 2010
- Posts
- 113
- Rep Power
- 0
password hiding when entered in the console.
Hi
I wrote a program , where user id and password are entered by the user in the console .
When the password is entered , i dont want it to be displayed.
Is their any way to do it .
And i call this method , in the Main Class.Java Code:private static String f_password(Scanner scan) { System.out.println("Enter password : "); String password = scan.next(); //Scan the input System.out.println("The given password is :"+password); return password; }
Thanks in advance.
- 10-13-2010, 08:33 PM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
After I don't know how many years of people asking for this Java finally provided the Console class to provide this behaviour.
Similar Threads
-
Calling a .Net webservice(Password Protected) from java console application
By charan reddy in forum Advanced JavaReplies: 2Last Post: 03-23-2010, 04:46 AM -
Password hiding
By C.A.B.A.L. in forum New To JavaReplies: 4Last Post: 03-04-2009, 08:25 AM -
how to check password for 3 times enterd wrong password
By sk.mahaboobbhasha@gmail.c in forum New To JavaReplies: 2Last Post: 11-14-2008, 07:53 PM -
how to check password for 3 times enterd wrong password
By sk.mahaboobbhasha@gmail.c in forum Java ServletReplies: 0Last Post: 11-14-2008, 01:22 PM -
How to check password of a jsp/html with the password of Database(mysql) #1
By sk.mahaboobbhasha@gmail.c in forum Java ServletReplies: 2Last Post: 11-14-2008, 01:11 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks