System.out.println(true && true);


#1

Tried to write this

System.out.println(true && true);

gets error message

Use the && operator and valid Boolean expressions on each side of &&.

Whats wrong?


#2

The answer should be: System.out.println(2 < 3 && 4 < 5);

but 2 < 3 isn't a Boolean expression.


#3

Thanks I had the same problem... :smile:


#4

I think that you will find that it is. A Boolean expression is an expression that evaluates to true or false.

2 < 3 meets that definition.

Maybe you are thinking about something that I'm missing?