Is it possible that Java String.split can return a null String[]

Viewed 57849

Is it possible for split to return a null String[]? I am curious as I want to try to be as defensive as possible in my code without having unnecessary checks. The code is as follows:

String[] parts = myString.split("\\w");  

do I need to perform a null check before I use parts post splitting?

4 Answers
Related