# Display 2 succesive images

**URL:** <https://discourse.processing.org/t/display-2-succesive-images/14966>\
**Category:** Libraries\
**Created:** [October 27, 2019, 2:45pm UTC](https://discourse.processing.org/t/display-2-succesive-images/14966 "2019-10-27T14:45:09Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [October 29, 2019, 11:43am UTC](https://discourse.processing.org/t/display-2-succesive-images/14966/21 "2019-10-29T11:43:42Z")

</div>

> [@GoToLoop](#):
>
> That is, the short-circuit behavior of `&&` won’t make any diff. in the case above.

Could you please elaborate on that a little?  
I mean, I thought that logical operators work on boolean expressions and return boolean values , whereas bitwise operators work on binary digits of integer values and return an integer.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [October 29, 2019, 12:05pm UTC](https://discourse.processing.org/t/display-2-succesive-images/14966/22 "2019-10-29T12:05:02Z")

</div>

> [@noel](#):
>
> , whereas bitwise operators work on binary digits of integer values and return an integer.

In Java, when both operands are of type `boolean`, the bitwise operators `&`, `|` and `^` are overloaded to act as logical operators too.

However in such case both sides are always eagerly evaluated.

While the logical operators `&&` and `||` are short-circuit evaluated:

> **[Short-circuit evaluation](https://en.wikipedia.org/wiki/Short-circuit_evaluation)**
>
> Short-circuit evaluation, minimal evaluation, or McCarthy evaluation (after John McCarthy) is the semantics of some Boolean operators in some programming languages in which the second argument is executed or evaluated only if the first argument does not suffice to determine the value of the expression: when the first argument of the AND function evaluates to false, the overall value must be false; and when the first argument of the OR function evaluates to true, the overall value must be true.
> I...

[Previous page](https://discourse.processing.org/t/display-2-succesive-images/14966.md?page=1)
