Thursday, November 24, 2011

Learn Java programming tutorial lesson 5 - Data input and type conversions

Until now we have set the values of variables in the programs. Now we will learn how to get input from the user so that our programs are a bit more interesting and useful.

Reading single characters

To read a single character from the user you must use the System.in.read() method. This will return and integer value of the key pressed which must be converted to a character. We use (char) in front of System.in...

0 comments:

Post a Comment

Setec Institute || Group : SH6 | | Name : Kim Chanthy. Powered by Blogger.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Hot Sonakshi Sinha, Car Price in India