11. Generalizations


#1

about second instruction, what should i do?


Need 11. Generalizations help!
#2

Here is what the second instruction says:

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

In order to make the else block print out, your Boolean expression must evaluate to false. Are you having trouble coming up with an expression that is false?


#3

I had trouble with this at first, but what it is saying is that you have to do boolean tricky = false;
thats it.


#4

@rubysolver12894

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

	System.out.println(56<87 && 66<67);
	
}

};

see here , i think it might help..

this is how condition works


#5

i get error for what expression that i write.


#6

You have to change the initial condition of the IF statement.

For instance, I changed the if(2015 < 2016) to if(2015 < 2011). This is actually what it wants - a bit confusing, I know.


#7

Try doing this - if( ! ( 2015 < 2016)).. It should be able to execute..


#8

A post was split to a new topic: Won't let me go through next chapter


#9