java how to convert string to String[] and put in Specific string variabel

This will put each character in a String object into an array of Strings.

String[] rp = new String[ket2.length()];
for(int i = 0; i < rp.length(); i++) {
rp[j] = "" + ket2.charAt(i);
}

Tell me if this helps!

Leave a Comment