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 about Readline() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "about Readline()" Watch "about Readline()" New topic
Author

about Readline()

y bin
Greenhorn

Joined: Feb 18, 2004
Posts: 4
how can I let usr input three number continuously and assign to various
variable?
this is part of the program,any body can teach me?thanks
--
try{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br =new BufferedReader(isr);
System.out.println("please input [n, a_min, a_max]: ");
n = Integer.parseInt(br.readLine());??
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

If the input is like 'n, a_min, a_max' then you have a String that you need to split up first with e.g. a StringTokenizer.
e.g.

Ren´┐Ż


Regards, Rene Larsen
Dropbox Invite
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: about Readline()