• Post Reply Bookmark Topic Watch Topic
  • New Topic

put the output in a txt file instead of the console

 
Moham'd
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys

could you give me a sample program demonstrating for me how to display the out put of a certain file in another file.
for example, i made a modification to file. And for example i let it give me the sentences ended with full stops each in a separate line. However, i need to get this out put in a txt file not in the console

just te remind, i know these stuff FileReader && FileWriter



regards
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java MyClass > output.txt
 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have to get output in a text file rather consol
plz explain to me how to use this code?? i dont understand
java MyClass > output.txt
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ">" character tells the command processor to put the program output into a file rather than display it. More info here.
 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess thx alot
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!