File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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: 986

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