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 IO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "IO" Watch "IO" New topic
Author

IO

Jade Davidson
Ranch Hand

Joined: Oct 12, 2001
Posts: 64
I hope someone can help me.
My Java textbook shows how to get input from the user and says that we should include a Java package called iopack. All the examples of user input in our book use this, and apparently it is a class that came with our book, but everyone in my class is having problems using it, so my teacher says we shouldn't use it.
Is there some other package I should be including to enable the user input? I am sorry if this is a stupid question; this is the only way they show us in the book.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12
Are you trying to get the input from the user on the command line, or while the program is running? They are different procedures.

To get input from the command line, you don't need to import anything.

To get input while the program is running, you need to import java.io.* ;

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Jade Davidson
Ranch Hand

Joined: Oct 12, 2001
Posts: 64
While the program is running. I want to prompt the user to enter their name and birthdate.
I am assuming that is while it is running, because it is after the main method starts.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12

Of course, you probably don't want to just echo the input so you'll have to modify this code.

[This message has been edited by Marilyn deQueiroz (edited November 04, 2001).]
Peter Simard
Ranch Hand

Joined: Oct 31, 2001
Posts: 54
//MyInput.java: Contain the methods for reading int, double, and string values from the
//keybord


(Marilyn added code tags)
[This message has been edited by Marilyn deQueiroz (edited November 05, 2001).]


PAS<br />peter@panvox.net<br />2b || !2b
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IO