I started the course Learn Java and have a question in response to exercise 11, about equality operators.
They tell me that “Equality operators do not require that operands share the same ordering. For example, you can test equality across
char , or
int data types.”
But when I compare a boolean with a int, like
boolean fish = true; int monkey = 6 ; System.out.println(fish == monkey);
I get an error. It isn’t possible to compare a boolean with another data type. The explanation suggested that it should be possible. Did I read it wrong? Or did I make a mistake in my code?