How do you solve the following question?
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).

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

//3 >= 3 && !(true || true) );
boolean tricky= false;
if(2015 < 2016) {
System.out.println("Stuck in the past...");
}else {
System.out.println("Upgraded to the future!");
}

3 >= 3 - this is true, because 3 is equal to 3 !(true || true) - this is false, because the expression in the brackets is true and there is â€ś!â€ť before the brackets

When we use the && operator to 3 >= 3 and !(true || true) we have true && false which is false.

Then the instructions say to set this value to tricky. Thatâ€™s all : )

i knw beginning to be annoying bt can u type what u wrote to get the right results?
this is now getting to that i dont get what they are asking me to do

Without giving you code, letâ€™s see if we can get you understanding this. The goal here is to learn, so donâ€™t give up! Letâ€™s stretch your brain a bit.

You need to use non-code related logic skills to evaluate for yourself the answer to 3 >= 3 && !(true || true));

In plain English, the above snippet means:

"Three IS GREATER THAN OR EQUAL TO three AND THE INVERSE OF THE GROUP true OR true."

Using logic, we can see the sentence as a whole is false.

Breaking it up:

Three IS GREATER THAN OR EQUAL TO three: this is true!

THE INVERSE OF THE GROUP true OR true: this is false!

When comparing two things and one of the two is false, then the entire thing can never be true.

Do you see or can you infer as to why that is?

The instructions of this exercise ask you to simply evaluate in your head whether the expression as a whole is true or false, which, as explain, it is clearly false. Therefore, either set tricky to the expression itself or to the primitive boolean literal false.

// first you must evaluate the expression on the next line ( it will be true or false )
// ( 3 >= 3 && !(true || true) )
// then put the answer after the = sign on this next line:
boolean tricky =

OKâ€¦ This makes sense. It was basically saying type two statements that may or may not be true! like true==false or 3>=2 or whatever. Alright I got it.

Hello from Serbia, can you please help me?..here is my code

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

(3 >= 3 && !(true || true));
boolean tricky = false;
if(!(2015 < 2016)) {
System.out.println("Stuck in the past...");
}else {
System.out.println("Upgraded to the future!");
}

Lets move further on this exercises, although Ive done first part of exercise like you said, I get this message
â€śGeneralizationsB.java:4: error: not a statement
(3 >= 3 && !(true || true));
^
1 errorâ€ť

In second part of exercise I should change something in IF statement to escape true answer and print false (else statement), right?
So I try several thingsâ€¦first I wrote
if(2015 > 2016)â€¦then
if(2015 < 2014)â€¦then
if(!(2015 < 2016))â€¦
and everytime I can not pass

Is there any other way to put another equation in to solve it, iâ€™m not seeing where you all got the equation that you are using and the actual digits that you are using to solve this exercise. I would like to solve it with a different equation if possible. If that is not possible, where did you get this equation from? I donâ€™t see this equation set up on the exercise. Please respond.