how to compare a character to individual characters in a string?
<p>I am trying to determine if the character at the beginning of a string is not equal to any of the characters in another string.</p>

<p>My problem is that even if the character is an 'a' for example it still trips on any of the other characters.</p>

<p>Here is the code I have so far:</p>

<pre><code>    public void searcher(String s)
    {
    boolean done = false;
    String checker = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

    for (int x = 0; x &lt; checker.length(); x++)
    {
        if(s.charAt(0) != checker.charAt(x))
        {
            System.out.println("Answer: " + s + "is not a valid identifier\n");
            break;
        }
    }
</code></pre>
