Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

I have to write the orange flow chart here in Java https://docs.google.com/drawings/d/19dt7JP9pRfKiMpGTryiJTKA0cDInI74BAXNEsHIZm5A/edit?hl=en_US I can't figure out how to write an if statement for the boolean "alive"

OpenStudy (anonymous):

The chart calls for a while statement not an if statement. However, in both cases, each evaluates to either true or false inside the parenthesis. boolean alive = true; while (alive) { do stuff } or if (alive) { do stuff} the above is a sort of short hand....you could write it like while (alive == true) {do stuff} or if (alive == true) {do stuff}

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!