Results 1 to 5 of 5
Thread: hi
- 01-26-2009, 04:59 AM #1
Member
- Join Date
- Jan 2009
- Posts
- 15
- Rep Power
- 0
hi
how to replace a string when the user type the value.
(
System.out.print("\t\tUsername : ");
username=in.readLine();
System.out.print("\n");
System.out.print("\t\tPassword : ");
password=in.readLine();
)
present output:
username: hai
password: 123
how to implement below output:
needed output:
username:hai
password:***
- 01-26-2009, 05:21 AM #2
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
Is it an IO task?username=in.readLine();
- 01-26-2009, 06:06 AM #3
i don't know of any api that does that (in console), so i would just check for the number of characters in password, then output the same number in *.
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 01-26-2009, 06:56 AM #4
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
where is the method? The code is not completed I guess :(in.readLine();
- 02-04-2009, 12:35 AM #5
found the sun article on this: Password Masking in the Java Programming Language
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks