split every character in string into array java

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

Also in Java: