Help with java code lesson


#1

I need help for learn java 11/11.

I can help if you need to have my code .

Re: OK. thinks for your help.
I post my code.

My Java code is : public class GeneralizationsB {
public static void main(String[] args) {

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

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

	}

}

}

and indicate instruction is :
"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

Hi yes can you post your code


#3

Answer at my problème now please!


#4

Do you try to answer ?


#5

Yes' I'm tryin to....
they aske you to evalue the line in comment to true or fase and save the answer to the variable tricky

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

#6

how to execute this?

i need to an exemple please


#7

YOu just need to do it like that

// ( 3 >= 3 && !(true || true) ) <-- #you need to avalue this boolean
boolean tricky = #here put either true or false

#9

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