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

user input

sagarika chinya

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

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 input stream.
For instance, the following program allows you to read three integer primitives from the keyboard:

[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:
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