Project Amber is making progress on pattern matching in #JavaNext. Here are three recent developments that I'm very excited about and I think you will be as well. (Caveats: these are ongoing discussions; none of this is final; speculation and strawman syntax ahead)
1. "Array patterns" allow matching and destructuring arrays. The `if`-line does three things: a) is `objects` a `String` array with length 2? b) if so, cast it to `String[]` and extract the two elements c) declare `a` and `b` and assign the two elements to them
"Can I also bind the arrays as a whole?" Likely. This is called an "as pattern". "What if the array can have more elements?" Allowing to express "at least two elements" is being considered - for example with three dots.