package J20250715.homework;

import java.util.Scanner;

/**
 * @author WanJl
 * @version 1.0
 * @title Demo02
 * @description toCharArray()方法
 * @create 2025/7/15
 */
public class Demo02 {
    public static void main(String[] args) {
        System.out.println("请输入一段字符串....");
        //创建Scanner对象
        Scanner sc=new Scanner(System.in);
        String s = sc.nextLine();
        char[] chars = s.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            System.out.println(chars[i]);
        }
    }
}
