This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes user input Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "user input" Watch "user input" New topic
Author

user input

sagarika chinya
Greenhorn

Joined: Oct 17, 2002
Posts: 11
hi,
I am new to java and i wanted to know if there is a function like scanf which can accept user input?
thanks
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Hi sagarika,
Welcome to Javaranch, a friendly place for Java greenhorns
In Java, you can retrieve characters typed on the keyboard by invoked the read() method on the System.in input stream.
For instance, the following program allows you to read three integer primitives from the keyboard:


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 984

Code samples at sun for reading and writing data
[ October 18, 2002: Message edited by: William Barnes ]

Please ignore post, I have no idea what I am talking about.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: user input
 
Similar Threads
Is there a possible way to use index properties on this situation
about pausing of execution
question about methed ?
Complex Number
Convert English word to arabic