3 ms·
Certainly won't compile in Java.
by grishka 5y ago
Certainly won't compile in Java.
- shawnz 5y agoIn fact you can apply the single ampersand & operator to booleans in Java, and just like in the example here it has the same behaviour as && but with no short-circuiting.
- grishka 5y agoHuh. I didn't know that.
- taeric 5y agoOddly... It would? Try: Map<String, Boolean> map = ... if (map.containsKey("hello") & map.get("hello")) { ...