permaculture playing cards
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

about Readline()

y bin

Joined: Feb 18, 2004
Posts: 4
how can I let usr input three number continuously and assign to various
this is part of the program,any body can teach me?thanks
InputStreamReader isr = new InputStreamReader(;
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.


Regards, Rene Larsen
Dropbox Invite
I agree. Here's the link:
subject: about Readline()
It's not a secret anymore!