Yes, but also no.
Technically, ==
compares two int
s. So in code like the following:
public static void main(String[] args) {
char a = 'c';
char b = 'd';
if (a == b) {
System.out.println("wtf?");
}
}
Java is implicitly converting the line a == b
into (int) a == (int) b
.
The comparison will still "work", however.