Suppose I have the following code:
String myString = "Hello";
char firstChar = myString.charAt(0);
I then want to check if firstChar has value "B". I tried
if(myChar == "b")
and
if(myChar.equals("b"))
but none of these work.
What solution could I use?
Thanks in advance!