Compare char is a primitive, you can compare it using the == operator. In a former code you were comparing a string using ==.