📜  toCharArray() 方法 java 代码示例

📅  最后修改于: 2022-03-11 14:52:05.954000             🧑  作者: Mango

代码示例1
public class CharArrayExample{
   public static void main(String args[]){
       String str = new String("Welcome to BeginnersBook.com");
       char[] array= str.toCharArray();
       System.out.print("Content of Array:");
       for(char c: array){
           System.out.print(c);
       }
   }
}