Z
zakhan
I'm trying to do an unbelievably simple thing but it's not working.
I want to split a string into its constituent characters. I want to
split the string 83AV into 8,3,A,V. I use the following code:
<code>
String str = "83AV";
String[] strToks = str.split("");
for (String tok : strToks)
System.out.println(tok);
</code>
This gives me an extra "null" String in addition to the actual tokens.
Any idea how we can do this in a simple way? What regular expression
should I use for the split function?
Thanks!
I want to split a string into its constituent characters. I want to
split the string 83AV into 8,3,A,V. I use the following code:
<code>
String str = "83AV";
String[] strToks = str.split("");
for (String tok : strToks)
System.out.println(tok);
</code>
This gives me an extra "null" String in addition to the actual tokens.
Any idea how we can do this in a simple way? What regular expression
should I use for the split function?
Thanks!