java i/o (how to write data to file .txt or .dat, etc line by line )