What is the problem here? 10:11 Generalizations


Here is my code but it just keeps saying "Try again. The variable tricky should equal either true or false":

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

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

if(2015 > 2016) {

        System.out.println("Stuck in the past...");

    }else {

        System.out.println("Upgraded to the future!");


int subwayTrain = 5;

    switch (subwayTrain){

        case 1 : System.out.println("This is a South Ferry bound train!");
        case 5 : System.out.println("This is a Brooklyn bound train!");
        case 7 : System.out.println("This is a Queens bound train!");
            System.out.println("I'm not sure where that train goes...");



They want you to manually resolve the expression

( 3 >= 3 && !(true || true) )    
(  true  && !(    true    ) )
(  true  &&      false      )

thus use

boolean tricky = false;


ya same here...wen i too typed the same code i got d same wrds try again...


hi, i don't understand this question
what is the purpose of this question?

1.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).


sir, you just saved my day (or say half of night?)

Muchos gracias!

I've tried the same thing as the guy who started the thread, and other stuff, but nothing seemed to work!

How I'm brand new to this, sometimes I have to read a couple of times the requirement to understand it!