Let me try to explain this
boolean riddle = !( 1 < 8 && (5 > 2 || 3 < 5));
System.out.println(riddle);
The || operator executes when one or both conditions are true, in this case both conditions are true and the boolean returns true. Then java moves to the outer bracket. 1<8 is true AND (5>2||3<5] is true so the whole bracket equals a true boolean. The -> ! <- operator negates everything in the brackets, which is why your output is “false”.
I hope that helped you at least a bit, I’m also a beginner which is why this is the best explanation i can offer you
Perhaps you are right. The OP needed clarification, though, so it was necessary to break some eggs. The question was posted with letter perfect code which is a bit suspect. Learners need to know that they have to put their foot forward first when it comes to effort, which in this case seemed sorely lacking. Had it not been for your atempt at answering, this thread would probably have died on the operating table.