2
Contributors
4
Replies
18
Views
3 Years
Discussion Span
Last Post by moaz.amin.37
0
 BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
 System.out.print("Type name: ");
 String name = reader.readLine();
 System.out.println("Hello " + name);

System.in is the InputStream associated with the console. You create a BufferedReader using that stream, then you can call its readLine() method to get the user's input.

Edited by JamesCherrill

0
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

i know this code but i do not know its working i mean i want to understand the whole working of BufferReader you can refer me any link that explain its working any article etc.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.