In this example given below, we will learn how to read character from keyboard and display on standard output device. Method System.in.read() read character from keyboard and returns integer value of the character so we need to change type to char.
Here is the code of GetCharMethod
Output will be displayed as:
Posted on: October 23, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles