Why do i get the output when the boolean value is false??
Printable View
Why do i get the output when the boolean value is false??
Please post your code here if you can using code tags, not an image.
If you do this:
you are SETTING myBoolean to true. Better would be:Code:if (myBoolean = true) { // = means assignment
and BEST would be:Code:if (myBoolean == true) { // == means testing for equailty
Code:if (myBoolean) { // don't even need == true here
i'll use the code function from now on
He's right if you post the whole thing in text thay can help you more.
@tnd_blazer, welcome to the forums. Please note the date on the original post - its been 3 1/2 years since this was posted. For a list of reasons, please avoid resurrecting extremely old posts.
Thread locked.