Created
January 22, 2015 10:16
-
-
Save yuanqing/b22bb0f34852233c9bb4 to your computer and use it in GitHub Desktop.
This file contains 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.util.*; | |
import java.io.*; | |
class ReadInputByCharacter { | |
public static void main(String[] args) throws Exception { | |
InputStreamReader isr = new InputStreamReader(System.in); | |
BufferedReader br = new BufferedReader(isr); | |
int n; | |
while ((n = br.read()) != -1) { | |
char c = (char) n; | |
System.out.print(c); | |
} | |
System.out.println(); | |
br.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment