Notice
Recent Posts
Recent Comments
Link
목록char형배열 (1)
개발 무지렁이

toCharArray() 문자열을 char형 배열로 바꿔준다. import java.io.*; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); char[] A = new char[N]; A = br.readLine().toCharArray(); for(int i = 0; i < N; i++) { System.out.print(A[i] + " "); } } }
코딩 테스트
2022. 12. 17. 11:51