Need help with Boolean operator:Precedence

Set the boolean variable puzzle equal to the Boolean result of the single line comment directly above it.

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

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

	// ( !true || (false && true) )
	boolean puzzle = true;


You are on the right track, you just have to put the right result there.

If you are having brain strain from trying to figure out the answer you can always put it in a println statement to make the computer do the work. :smile:

Thank you! Yes, brain strain at its best …

1 Like

where do u put that