joseleonweb

Untitled

Mar 1st, 2021
390
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.io.*;
  2.  
  3. public class ReadChars {
  4.  
  5.     public static void main(String[] args)
  6.             throws IOException {
  7.            
  8.         char c;
  9.         BufferedReader br = new
  10.                 BufferedReader(new
  11.                         InputStreamReader(System.in));
  12.         System.out.println("Enter characters, period to quit.");
  13.        
  14.         // read characters
  15.         do {
  16.             c = (char) br.read();
  17.             System.out.println(c);
  18.         } while(c != '.');
  19.     }
  20. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×