package javaapplication1;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class JavaApplication1 {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = null;
System.out.println("Write a Line of Text, '.' to quit");
try
{
while ( (s = br.readLine()) != null)
{
if (s.equals("."))
break;
System.out.print("The Line of Text is: " + s);
System.out.println();
}
br.close();
}
catch(Exception e)
{
System.out.println(e.getMessage());
}
}
}
/*
run:
Write a Line of Text, '.' to quit
java programming
The Line of Text is: java programming
windows
The Line of Text is: windows
android
The Line of Text is: android
web
The Line of Text is: web
.
*/