by Dinesh Thakur Category: Stream

To read a character form the Buffered Reader object, use the following version of read() method. int read( ) throws IOException

The method read() will return a integer value corresponding the character from the input stream and if end of the stream come across then it will return -1.


Example: To read characters.



class CharacterRead


public static void main(String args[]) throws IOException


char ch;

BufferedReader brObj = new BufferedReader(new InputStreamReader(;

System.out.println("Enter characters, 'Q' to quit.");



ch = (char);


} while(ch != 'Q');






Character Reader

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Related Articles