Results 1 to 4 of 4
  1. #1
    farahm is offline Member
    Join Date
    Nov 2010
    Location
    Beirut, Lebanon
    Posts
    36
    Rep Power
    0

    Default simple question. thanks in advance fro your help

    im writing a password check program in java now i sorted out that i need at least 6 letters and maximum 15, and at least a letter and a digit but i need to sort out the rule "not to end the password with '99'.

    it says it cannot be a series of alphabetical characters ending with '99' so i started with if it is all characters and want to check the last two and wrote this:
    if (var == true) //all letters
    {
    if (Character.isDigit(S.charAt(S.length()-2)) && Character.isDigit(S.charAt(S.length()-1))) //last two digits
    {

    }


    }
    }
    how do i check if the last two digits are 99?
    thanks in advance for your help

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,045
    Blog Entries
    7
    Rep Power
    23

    Default

    Don't double post; I already answered your question in your other thread.

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

  3. #3
    farahm is offline Member
    Join Date
    Nov 2010
    Location
    Beirut, Lebanon
    Posts
    36
    Rep Power
    0

    Default

    i replied in the other thread that i cannot use the method you supplied.
    and i guess this question is for advanced so i posted it here.
    thanks

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,045
    Blog Entries
    7
    Rep Power
    23

    Default

    Quote Originally Posted by farahm View Post
    i replied in the other thread that i cannot use the method you supplied.
    and i guess this question is for advanced so i posted it here.
    thanks
    And I replied to your reply again supplying you with an alternative solution; you have to read the replies in your own threads (b.t.w. there's nothing advanced about your problem).

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

Similar Threads

  1. question. thanks in advance for your help
    By farahm in forum New To Java
    Replies: 4
    Last Post: 11-22-2010, 12:25 PM
  2. small problem, thanks in advance for your help
    By farahm in forum New To Java
    Replies: 4
    Last Post: 11-22-2010, 10:26 AM
  3. How to advance ?
    By House in forum New To Java
    Replies: 14
    Last Post: 08-29-2010, 03:29 AM
  4. Advice for Advance projects?
    By suyash89 in forum Advanced Java
    Replies: 7
    Last Post: 01-02-2010, 11:51 PM
  5. Probably a really simple question...
    By ibanez270dx in forum New To Java
    Replies: 0
    Last Post: 11-16-2007, 02:27 AM

Posting Permissions

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