Comparing characters
<p>Suppose I have the following code:</p>

<pre><code>String myString = "Hello";
char firstChar = myString.charAt(0);
</code></pre>

<p>I then want to check if firstChar has value "B". I tried</p>

<pre><code>if(myChar == "b")
</code></pre>

<p>and </p>

<pre><code>if(myChar.equals("b"))
</code></pre>

<p>but none of these work.</p>

<p>What solution could I use?</p>

<p>Thanks in advance!</p>
