Does Java have lazy evaluation?
Well, as far as the language is concerned – yes, both functions are called. If you rewrote the function to this: public boolean isTrue() { return isBTrue() || isATrue(); } then the second function will not be called, if the first is true. But this is short-circuit evaluation, not lazy evaluation. Lazy evaluation case would … Read more