I\'m trying to use
\"value1:value2::value3\".split(\":\");
Problem is that I want it to include the blank results.
It returns:
Use a negative limit in your split statement:
String str = "val1:val2::val3"; String[] st = str.split(":", -1); for (int i = 0; i< st.length; i++) System.out.println(st[i]);
Results:
val1 val2 val3