• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use System.in.read()?  RSS feed

 
Cyrus Serrano
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

hello all, i wish to know , how to read values in java. A friend of mine told me to use System.in.read() method, but can't seem to use it in my program.
anyone , please guide me on how to use this method.
Cyrus
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cyrus,
Does this have anything to do with the question you asked (and I answered) in the JSP forum? (Because the answer is very similar!)
[NOTE: Uncompiled and untested!]

Hope it helps.
Good Luck,
Avi.
[ November 18, 2003: Message edited by: Avi Abrami ]
 
Cyrus Serrano
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello avi,
thanks for the quick response. this has no relation with my JSP question, its a different query. But I appreciate the response. I will try to use the codes you have posted thanks.
if i may add, can you give me examples on how to read numbers in Java. using System.in.read().
thanks again AVI..
Cyrus,
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cyrus,

Can you give me examples on how to read numbers in java, using "System.in.read()".

Just add the following line to the end of my previous code snippet:

For your information, I recommend perusing the API documentation for the classes mentioned in my code snippets!
Good Luck,
Avi.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!