Re:New Features in Java 14
by chii on Tuesday March 03, 2020 @06:26PM
(#22479744)
Using the `match` method, you can guarantee that in the `some()` branch, v is not null, and will never be null.
In the `if == null` method, the `something` reference is null, but if you have functions that also reference `something` down the line, you're going to have to check it again for null-ness.
In the `if == null` method, the `something` reference is null, but if you have functions that also reference `something` down the line, you're going to have to check it again for null-ness.