Java 21 Switch Pattern Matching Leetcode