Results 1 to 3 of 3
  1. #1
    Meta is offline Member
    Join Date
    Mar 2010
    Posts
    78
    Rep Power
    0

    Default the opposite of equalsignorecase?

    i want to make a while loop that is while the user didnt type "Stop" keep going.

    but while(word.equalsignorecase ("stop") is while it DOES EQUAL. is there a NOT equalsignorecase?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    The exclamation mark, !, when placed in front of a boolean expression means not.

    Java Code:
    while(!word.equalsIgnoreCase("stop") {
    
    }

  3. #3
    Meta is offline Member
    Join Date
    Mar 2010
    Posts
    78
    Rep Power
    0

    Default

    thanks. actually figured it out . im fixing up my code. im going to put it into my other thread.

Similar Threads

  1. comparing 3 strings with equalsignorecase
    By vividcooper in forum New To Java
    Replies: 4
    Last Post: 01-13-2010, 09:30 PM
  2. Can't get graphics to move opposite direction
    By Nimblyjacks in forum Java Applets
    Replies: 8
    Last Post: 12-22-2009, 01:46 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
  •