any one is here that explain to me that how to get console input using BufferReader in java and explain me its working briefly.

 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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.