Quantcast
Channel: User Federico klez Culloca - Stack Overflow
Viewing all articles
Browse latest Browse all 502

Answer by Federico klez Culloca for Why BiPredicate evaluates the two boolean conditions prior to applying the test function

$
0
0

No, you're passing three arguments to result:

  • The BiPredicate
  • X
  • Y

They get evaluated before calling result, which means the BiPredicate is evaluated and returns a BiPredicate (which is not executed), then X is evaluated, than Y but Y is obj.getSomeMethod() and obj is null, so the NullPointerException is thrown.


Viewing all articles
Browse latest Browse all 502

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>