
can u explain this import java.io.*; class SString{ public static void main(String ar[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter string: "); String name=br.readLine(); System.out.println("You have entered: "+name); } }

Hi Friend,
Your code reads the input from the user and display back the output.
The class InputStreamReader(System.in) allows the user to input string on the console. The method br.readLine() of BufferedReader class reads the input from the console. And using println() method displayed the entered value on the console.
Hope that it will be helpful for you.
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.