joseleonweb

Untitled

Mar 1st, 2021
323
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.io.*;
  2.  
  3. public class ReadLines {
  4.  
  5.     public static void main(String[] args)
  6.             throws IOException
  7.     {
  8.         // create a BufferedReader using System.in
  9.         BufferedReader br = new BufferedReader(new
  10.                 InputStreamReader(System.in));
  11.         String str;
  12.        
  13.         System.out.println("Enter lines of text.");
  14.         System.out.println("Enter 'stop' to quit.");
  15.         do {
  16.             str = br.readLine();
  17.             System.out.println(str);
  18.         } while(!str.equals("stop"));
  19.     }
  20. }
  21.  
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.

×