Help me ,change what i need here for lesson 2


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) {

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 = 9;

	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...");





Please remember to include a link to the exercise. Thanks.


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