Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I/O

 
naveen babu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i get multiple line input using from console BufferedReader class
or
how can i get multiple line input using from console using any class.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you describe the problem in more detail? What kind of input are you expecting? Is it typed by a human user?

ReadLine is of course going to get you one line. For multi-line input you'd just call it repeatedly. I'm guessing you'd have trouble knowing when one group of lines is done and it's time to process them? Maybe make the user type a "fence" to indicate the end, eg a blank line or a special character.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic