Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class ReadChars {
- public static void main(String[] args)
- throws IOException {
- char c;
- BufferedReader br = new
- BufferedReader(new
- InputStreamReader(System.in));
- System.out.println("Enter characters, period to quit.");
- // read characters
- do {
- c = (char) br.read();
- System.out.println(c);
- } while(c != '.');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement