Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 3
    !true means not true. !boolean means either not false or not true depending on the value of the boolean, which itself is logical inversion. Commented Feb 26, 2012 at 0:53
  • 1
    @S.Robins I find stupid name of boolean for a boolean variable. Something like for example isVisible would be a better example. Then if (!isVisible) would mean if not visible - which is simpler to understand then if (isVisible==false), which is an inverse logic. Hope it's clearer now. Or, did I misunderstood your comment? Commented Feb 26, 2012 at 1:02
  • you are inserting the 'not' where it can't actually go to suit your argument. your first example translates to 'if not the condition is true'. Commented Oct 5, 2020 at 9:37