Search:

Type: Posts; User: aussiemcgr

Search: Search took 0.20 seconds.

  1. Re: If statement: ==/.equals() problems with .charAt()

    Your problem is with this statement:

    for(counter = 0; counter <= actualWord.length(); counter++){


    This is a very common mistake. String.length() returns the number of characters in a String....
  2. Re: If statement: ==/.equals() problems with .charAt()

    The String.charAt() method returns a char. Since chars are primitives (and really just an int), you can use == instead of .equals(). I'm not 100%, but I would assume the preferred way of comparing...
Results 1 to 2 of 2