Monday, October 14, 2013

Java Program to read text using readline function

import java.io.*;
class Read{
public static void main(String args[]) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str;
System.out.println("Enter text \n stop to terminate" );
do{
str= br.readLine();
System.out.println(str);
}
while(str.equals("Stop"));
}
}

No comments:

Post a Comment

Ads Inside Post