Results 1 to 5 of 5

Thread: hi

  1. #1
    arunkumarinfo is offline Member
    Join Date
    Jan 2009
    Posts
    15
    Rep Power
    0

    Unhappy 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:***

  2. #2
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    username=in.readLine();
    Is it an IO task?

  3. #3
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    6

    Default

    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)

  4. #4
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    in.readLine();
    where is the method? The code is not completed I guess :(

  5. #5
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •