The basic technique of reading a String provided by a user at a command-line is fairly simple, but more lengthy than you’d expect. It involves the use of the System.in object, along with the InputStreamReader and BufferedReader classes. The code in Listing 1 shows how you can prompt the user to enter a String value, such as their name, and then read that value. for more
read this
Related Posts : java
No comments:
Post a Comment