Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

R/W to Console and file simultaneously  RSS feed

 
Steve De Costa
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made a simple menu for console output for java where the user inputs 1, 2, .... or whatever choice from displayed menu and then the desired output is displayed. I wanted to know how can I write the output to a file at the same time as I read and write to console.......

(HOpefully the questions is not too vague....)

Thanks for your help.
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is not overly vague, assuming you just want to put the string up on the console and as well write to a file for later viewing:


Or some variation thereof.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!