Skip to content

Instantly share code, notes, and snippets.

@blaswan
Created August 25, 2013 07:55
Show Gist options
  • Select an option

  • Save blaswan/6332556 to your computer and use it in GitHub Desktop.

Select an option

Save blaswan/6332556 to your computer and use it in GitHub Desktop.
사용자로부터 문자열 입력받는 기본 예제 * InputStream - byte * InputStreamReader - character * BufferedReader - 문자열
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