This site requires JavaScript, please enable it in your browser!
Greenfoot back
HELP
HELP wrote ...

2021/5/23

IMPORTANT AND URGENT!!!!

HELP HELP

2021/5/23

#
if (b1 || b2 || b3 || b4 || b5 || b6 || b7 || b8) if all b1 , b2 , b3 are decleared as booleans. What does this line of code mean? ie does it mean if all booleans are true then the next set of code is exectuded inside / under the if statment?
HELP HELP

2021/5/23

#
AND HOW WOULD I SAY IF ALL THE BOOLEANS ARENT TRUE THEN... AND IF THEY ARE AL,L TRUE? PLEASE HELP!!!
Gbasire Gbasire

2021/5/23

#
calm down. when writing a if, "||" means OR and "&&" means AND so if you write if(b1 || b2 || b3) it will check if b1 OR b2 OR b3 is true, only 1 is needed to make it work. but if you write if(b1 && b2 && b3) it will check if b1 AND b2 AND b3 is true, all of them are needed to make it work now to check if it's NOT true, you can but the "!" keyword before it, here are some examples : if(!b1 || !b2 || !b3) if(!b1 && b2 && b3) if(!isTouching(Actor.class)) if(number == 5) etc
HELP HELP

2021/5/23

#
there is an error with my code please help i said boolean b1 = username1.equals(uname1); etc etc etc. and its underlined and apparently when the compiler reaches this line it has an error and appaently this is caused from that line
Gbasire Gbasire

2021/5/23

#
please share the whole code please
You need to login to post a reply.