How to convert a String into an array of Strings containing one character each
arrays, java, string
Solution
String[] result = input.split("(?!^)");
What this does is split the input String on all empty Strings that are not preceded by the beginning of the String.
Problem
I have a small problem here.I need to convert a string read from console into each character of string. For example string: "aabbab" I want to this string into array of string.How would I do that?