Java, comparing singlecharacter string to character
<p>Is there an easy way of comparing a string (which you know to contain only a single character) to a character? The method I am currently using feels a bit "clunky". </p>

<pre><code>c == "x".charAt(0)
</code></pre>

<p>Where c is a character. The reason I am using "x" (string) is because I don't know how to write x as a char, so I have to do this.</p>
