11.Generalizations

What is wrong with this code?

I had it do the same thing to me, switched it to true still didn’t work then back to false and it worked. not sure what’s up, must be a bug.

hi,
change the following line in this code

int subwayTrain =9;

to either 1,5,or 7

This code worked to get the first instruction PASS

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

(( 3 >= 3) && !(true || true) )
boolean tricky = false;
1 Like

I am not getting the second instruction executed…i dont know what is wrong? :frowning:

same here, seems like a bug!

i got it :slight_smile:see, if this helps …
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!");

	}


int subwayTrain = 5;

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

	}

}

}

thats exactly how I had it, somehow it would not work, but now it does… guess I had to let it cool off for a night haha thanks anyways mate.

lol…okay…yoo buddy !! :wink:

3 posts were split to a new topic: 11. It’s not working for me

Thank you so much!!! was working for hours on that one thing!! I understand now!!