11-Generalizations

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

Why come the wrong ?

<Below this line, add a link to the EXACT exercise that you are stuck at.>
11 Generalizations

<In what way does your code behave incorrectly? Include ALL error messages.>
Print the message in the else block.

``` if ( 5 <= 3 && !(true || true)){ boolean tricky=true; System.out.println(tricky); }else{ boolean tricky=false; System.out.println(tricky); }

Replace this line with your code.

<do not remove the three backticks above>

https://www.codecademy.com/en/courses/learn-java/lessons/conditionals-control-flow/exercises/generalizations-conditionals

There are three segments of code, each corresponding to one of the questions. The first is a visual problem to manually solve. What value should be assigned to tricky?

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

Treat the other two questions separately and perform the required tasks on their respective code segment.

Hi! Roy,

help me please?

first segment tell: if expression visual result ist false, than
triky=false;

segond- Change code to print in else block:

my block if: if trikly==true {(println trickly);} else{println( trikly); }

so trikly true or false print o.
the value the trickly false print code em else block

I don`t understand where ist the wrong?

The problems are very simple and most of the code is already written. There is no tricky variable beyond the first question.

The second question wants us to print out, Upgraded to the future!. That means the boolean expression needs to result in false. ____ > ____ or ____ < ____?

The third question just asks us to set the int variable subwayTrain so that it matches the case that prints, This is a Brooklyn bound train!. That’s not a big problem, is it?

thank you very much!!!
the problem is very easly sometimes we come in loop?

thank thank now all Ok

1 Like