R/W to Console and file simultaneously

Steve De Costa

Ranch Hand

Posts: 33

posted 9 years ago

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

posted 9 years ago

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.

"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."