Java examples for java.lang:String Array
string To Character Array
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { String s = "java2s.com"; System.out.println(java.util.Arrays .toString(stringToCharacterArray(s))); }// w w w . j a v a 2 s . c om private static Character[] stringToCharacterArray(String s) { char[] arr = s.toCharArray(); Character[] carr = new Character[arr.length]; for (int i = 0; i < arr.length; i++) { carr[i] = arr[i]; } return carr; } }