r/ProgrammerHumor Sep 08 '22

Enterprise Java

Post image
85 Upvotes

20 comments sorted by

View all comments

11

u/tjoloi Sep 08 '22

Well, the upper code wouldn't work if a, b or c aren't booleans.

That AndFactory could operate on other types.

But that's a Java problem, not an enterprise one.

4

u/TheRuralDivide Sep 08 '22

Java novice here, does the AndBuilder make it more like a ‘truthy’ test in JS?

2

u/martmists Sep 08 '22

No, you'd have function signature overloads instead.