L2Q11 help


#1

i need help on the second part. help please.


#2

@devcoder66466,
Are we looking at

  1. ( 3 >= 3 && !(true || true) ) What is the RESULT ?? true or false
    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).

  2. Use a Boolean expression that will print out the code in the else block of the if/else statement.

if(2015 > 2016) {
          System.out.println("Stuck in the past...");
}else {
               System.out.println("Upgraded to the future!");
}

3.. Set the value of the int variable subwayTrain equal to the case that will print "This is a Brooklyn bound train!" to the console.

int subwayTrain = ?;
switch (subwayTrain){
    case 1:  System.out.println("This is a South Ferry bound train!");
             break; 
    case 5:  System.out.println("This is a Brooklyn bound train!");
             break;
    case 7:  System.out.println("This is a Queens bound train!");
             break;
    default: System.out.println("I'm not sure where that train goes...");
}