Problem in tornary conditional


#1

Hi iam at lesson 11(The last one)
And iam stuck in something

Instructions:
**Use the precedence rules to help you evaluate the Boolean expression in the single line comment above the tricky variable.

Then, set the boolean variable tricky equal to the result (either true or false).**

my code:

boolean tricky = ( 3 >= 3 && !(true || true)) ;

What is my problem here
3 >= 3 = true;
!(true || true) = false;
true && false = false;
So what is the problem
please answer fast


#2

set the boolean variable tricky equal to the result (either true or false)

leave the line as comment as it was.like

// ( 3 >= 3 && !(true || true)) ;

so now you know it should be false so set it like

boolean tricky =false;


#3

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