3 ms·
In 2nd preview, they used &&: https://openjdk.org/jeps/420 https://openjdk.org/jeps/420 At 3rd preview, they switched to when: https://openjdk.org/jeps/427 htt
by bcrosby95 4y ago
In 2nd preview, they used &&:
https://openjdk.org/jeps/420 https://openjdk.org/jeps/420
At 3rd preview, they switched to when:
https://openjdk.org/jeps/427 https://openjdk.org/jeps/427
In that JEP they state:
> Based upon experience and feedback we propose instead to allow when clauses in switch blocks to specify guards to pattern labels
So I assume people thought && was confusing.
- deleted 4y ago[deleted]