Exercise 5 not letting me pass, even though I did it correctly?

Here is where im stuck. The exercise says to make it print false. I made it print false with no errors after running it but it’s not letting me pass the section.


I don’t believe I did it wrong because it prints false when i run it. Isn’t that what’s it told me to do?

Here is my code that prints false

public class Precedence {
	public static void main(String[] args) {

		boolean riddle = ( !(1 < 8) &&(5 > 2 || 3 < 5));


What errors did the code give you?

boolean riddle = !(1 < 8 &&(5 > 2 || 3 < 5));
Don’t bracket the 1<8, place the bracket around the whole thing. so the ! is for the whole statement

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.