한 줄을 입력받고, 띄어쓰기를 줄바꿈으로 바꾸어 출력하여라.
package my.baekjoon.io;
import java.io.*;
import java.util.*;
public class temp {
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringTokenizer st = new StringTokenizer(br.readLine());
while(st.countTokens()>0) {
bw.write(st.nextToken());
bw.flush();
bw.newLine();
}
br.close();
bw.close();
}
}