3 ms·
Yes, Java's pattern matching is much more fully fledged than Kotlin's. You can destructure nested types. Also, at some point in the (near) future, you should be
by gher-shyu3i 6y ago
Yes, Java's pattern matching is much more fully fledged than Kotlin's. You can destructure nested types. Also, at some point in the (near) future, you should be able to do things like:
Object o = new int[]{1, 2};
if (o instanceof int[] {var a, var b}) {
// a == 1, b == 2
}