본문 바로가기
언어/JAVA

BufferedReader

by 김어찐 2021. 8. 2.
728x90
public class BufferedReaderTest {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		char [] ch = in.readLine().toCharArray();
		
		for(char c :ch)
		{
			System.out.println(c);
			
		}
		StringTokenizer st = new StringTokenizer(in.readLine()," ");
		int i = Integer.parseInt(st.nextToken());
		int j = Integer.parseInt(st.nextToken());
		System.out.println(i+"//"+j);
	}
}

 

입력 및 출력

728x90

'언어 > JAVA' 카테고리의 다른 글

자바 sort (Compareable, Comparator, lambda)  (0) 2021.08.06
자바 조합 생성  (0) 2021.08.03
java 순열, 중복 순열, 조합, 중복 조합  (0) 2021.08.03
StringBuilder  (0) 2021.08.02
java input.txt 읽기  (0) 2021.07.29