EJP wrote:I intend to do this ...
From the Javadoc: 'trailing empty strings are discarded'. In this case that's all of them. So a zero length array is as expected.
EJP wrote:Have looked at this method ...still not sure what needs to be sent for "int" argument .
Have a good look at the String.split(String, int) method and the various possibilities for the second argument.
EJP wrote:It says
Yes it's possible. Look again. Look particularly at what happens when zero is passed, which I quoted above, and which is clearly what you don't want to happen.