Created
September 29, 2019 19:39
-
-
Save markruler/80260ef8890a7c02a6461770d829fc87 to your computer and use it in GitHub Desktop.
버퍼 필터 스트림 예제
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); // 선언 | |
String s = bf.readLine(); // String | |
int i = Integer.parseInt(bf.readLine()); // int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); // 선언 | |
String s = "abcdefg"; // 출력할 문자열 | |
bw.write(s + "\n"); // 출력 | |
bw.flush(); // 남아있는 데이터를 모두 출력시킴 | |
bw.close(); // 스트림을 닫음 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment