java 讲字符串转换为字符数组

package test;

public class stirngtest {
    public static void main(String args[]){
        char a[][]=new char[21][21];
        String str=new String("www.runoob.com");
        System.out.println("ddd");
        System.out.println(str.toCharArray());
        a[0]=str.toCharArray();
        System.out.println(a[0]);
    }
}

 

你可能感兴趣的:(java)