JAVA SP T


Lets dive into snapshot of my programs!💻

2. Enter the string from user using BufferedStreamReader

💡Code:

 import java.io.*;

              class Buffered_Stream7078
              {
                public static void main ( String s[] ) throws IOException
                {
                  System.out.print ( "Enter the string: " );
              
                  BufferedReader input = new BufferedReader ( new InputStreamReader ( System.in ) );
              
                  String inputString = input.readLine();
              
                
              
                  System.out.println ( "Entered string is: " + inputString );
                }
              }

📸Output :

output