Created
August 25, 2013 07:55
-
-
Save blaswan/6332556 to your computer and use it in GitHub Desktop.
사용자로부터 문자열 입력받는 기본 예제 * InputStream - byte
* InputStreamReader - character
* BufferedReader - 문자열
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
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| public class Test { | |
| public static void main(String[] args) throws IOException { | |
| InputStreamReader r = new InputStreamReader(System.in); | |
| BufferedReader b = new BufferedReader(r); | |
| String userInput = b.readLine(); | |
| System.out.println("user input :"+userInput); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment