1 package org.sapia.console.examples; 2 3 import java.io.File ; 4 import java.io.PrintStream ; 5 6 7 16 public class Main { 17 public static void main(String [] args) { 18 try { 19 java.io.FileOutputStream fos = new java.io.FileOutputStream (new File ( 20 "bin/output.txt"), true); 21 PrintStream ps = new PrintStream (fos, true); 22 ps.println("THIS IS PROGRAM OUTPUT"); 23 ps.flush(); 24 ps.close(); 25 } catch (Exception e) { 26 e.printStackTrace(); 27 } 28 } 29 } 30 | Popular Tags |