https://majadhondt.wordpress.com/2012/05/16/googles-9-lines/
Is this example correct? Can someone explain to me how this: if (toIndex > arrayLen)
is correct?
If the array length is say 5, and toIndex is 5, that should still throw an index out of bounds exception, right? But it would be acceptable here.