Both of String#split() in Java and -split operator in PowerShell take regex as argument, and split string into a list or an array, but there is some difference in behavior when you pass an empty string as argument.
In Java:
System.out.println("abc".split("").length); // -> 3
Whereas in PowerShell:
PS > ("abc" -split "").Length # -> 5
Because ("abc" -split "")
makes @("","a","b","c","")
.
Also in PowerShell:
PS > ("abc".split("")).Length # -> 1
Because split("")
will not split the target string at all.