This is correct - this expression `3 >= 3 && !(true || true) );`

is really false.

thank you!

many thanks

WHAAAAAAT? im soooooo clueless

what did you do to get it right?

**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`

.

Do you understand?

public class GeneralizationsB {

public static void main(String args) {

```
// ( 3 >= 3 && !(true || true) )
boolean tricky (3 >= 3 && (true || true))
if(2015 < 2016) {
```

… what did i do wrong? its not running

You need an `=`

assignment operator.

`boolean tricky **=** (3 >= 3 && (true || true))`

wooooooooow i was way outer space,

Honestly, I’m super confused with this whole thing. I don’t really know what it’s asking me to do

```
// 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.

great yaar you solved my problem

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!");
}
```

Let`s move further on this exercises, although I`

ve 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

What is wrong with my code?

in the same exercise, part three, we should put number 5 instead of th 9, right?

hey just figured it out put the // back in to the beginning.

just undo the first half of step one

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.

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