import java.util.Scanner;
import java.util.Arrays;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.next();
char[] arr = new char[a.length()];
for (int i=0;i<a.length();i++){
arr[i] = a.charAt(i);
}
System.out.println(Arrays.toString(arr));
}
}
2.split 사용해서 분해하기
import java.util.Scanner;
import java.util.Arrays;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.next();
String[] a2 = a.split("");
// 각 문자별로 나눔
for(int i=0;i<a2.length;i++){
System.out.println(a2[i]);
}
}
}