In Java 8 new methods in Boolean class have been added.
Let's just talk about one of them i.e
public static boolean Boolean.logicalOr(boolean a , boolean b)
Now, my question is, Why are they added.
What's the difference between the two following cases.
boolean result = a || b; or Boolean result = Boolean.logicalOr(a,b);
What's so special about Boolean.logicalOr() and when should I prefer one over the other.
@seereference that might be helpful? – Sotirios Delimanolis 17 hours agoBoolean.logicalOr(a,b)in your code. When you have multiple, functionally identical ways to write code, you should always choose the most readable. – VGR 10 hours ago