Split Every Character In String Into Array Java

[Solved] Split Every Character In String Into Array Java | Swift - Code Explorer | yomemimo.com
Question : split every character in string into array java

Answered by : xenophobic-xenomorph-tyzvetbbcynk

String s="abcd";
char[] a=s.toCharArray();

Source : https://www.quora.com/How-do-you-split-a-word-in-Java | Last Update : Thu, 12 Mar 20

Question : split each character in a string (java)

Answered by : thankful-teira-499p63zgwbal

 class Test { public static void main( String[] args) { String[] result = "Stack Me 123 Heppa1 oeu".split("\\a"); // output should be // S // t // a // c // k // M // e // H // e // ... for ( int x=0; x<result.length; x++) { System.out.println(result[x] + "\n"); } } }

Source : https://stackoverflow.com/questions/1521921/splitting-words-into-letters-in-java | Last Update : Tue, 22 Dec 20

Answers related to split every character in string into array java

Code Explorer Popular Question For Swift