Search:

Type: Posts; User: pbrockway2

Search: Search took 0.09 seconds.

  1. Replies
    11
    Views
    3,664

    [SOLVED] Re: Read strings, calculate Hamming Distance

    Yes, it should be a character. Remember that character lliterals have single quote marks around them like 'a' which is quite a different thing than a variable like a

    ---

    If you've covered...
  2. Replies
    11
    Views
    3,664

    [SOLVED] Re: Read strings, calculate Hamming Distance

    You are passing the indexOf() method a String, "a". Read the documentation linked to for indexOf() to see what sort of thing the argument should be.
  3. Replies
    11
    Views
    3,664

    [SOLVED] Re: Read strings, calculate Hamming Distance

    Strictly speaking you weren't asked to ignore nonbase characters, you were asked to asked to ignore strings that contained such characters.

    You can test if some character ch is in a String str...
Results 1 to 3 of 3