11/11 Generalizations Error


#1



https://www.codecademy.com/en/courses/learn-java/lessons/conditionals-control-flow/exercises/generalizations-conditionals?action=resume


I am running the code below. I am on the second instruction, and it isn't working.


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

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

			System.out.println("true");

		}else {

			System.out.println("false");

		}
	
	

	}
}


#2

boolean tricky should be false

boolean tricky = false;

and just change the Boolean expression in the if statement nothing else

dont change the print statements.

so your code should be like

if(condition) { //here give your own condition

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

}else {

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

}

#3

I tried that and still says I got it wrong for the if condition.


#4

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

else

{
System.out.println("Stuck to the past...");
}

i too face the same error....someone please help...i'm not able to proceed further eacuse of this


#5

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