I am trying to split a string as follows
String string = "mike|ricki"
If I do the following string.split("|")
I would expect an array of 2 elements, "mike"
and "ricki"
. Instead I am getting the following
[, m, i, k, e, |, r, i, c, k, i]
Am i doing something fundamentally wrong here?