I am using jdk 1.6, I am trying to run below code but it is not working as expected:
String[] arr = ",,,,,".split(",");
But length of arr is shown 0. I am expecting 6 elements in arr with all elements ""(blank) value.
Can anyone explain me reason behind this? Is there any Regular expression available to fulfil my requirement?