java - Getting ArrayIndexOutOfBound on String split -
i splitting string in string array.
string = "somestring1, somestring2 00000-0000"; string[] b = a.split("(\\, )|(\\ )|(\\-)");
and assigning array values
string c = b[0]; string d = b[1]; string e = b[2]; string f = b[3];
which giving exception arrayindexoutofbound array index out of range: 4
Comments
Post a Comment