Here is a Java program that helps you to understand the use of BufferedReader & InputStreamReader. Type, compile, and run to understand how to use the BufferedReader & InputStreamReader in a Java program.
In this program, multiple lines of text can be received as input until a specific word is not entered as line content.
using BufferedReader & InputStreamReader in a Java program
public static void main(String args)
BufferedReader br=new BufferedReader(new BufferedReader(new InputStreamReader(System.in)));
System.out.println(“Enter lines of text”);
System.out.println(“Enter stop to quit”);