Here you can find the source of toCharArray(String str)
public static char[] toCharArray(String str)
//package com.java2s; /**/*from www . jav a 2s. com*/ * HashMap?????????????????????????new?????????????????????????? * ???????? * code by guava-libraries.(Apache License 2.0) * https://code.google.com/p/guava-libraries/ * * @return HashMap???????????????????????? */ public class Main { public static char[] toCharArray(String str) { char[] result = str.toCharArray(); return result; } }