All pastes #753849 Raw Edit

writeFile

public java v1 · immutable
#753849 ·published 2007-10-29 16:30 UTC
rendered paste body
import java.io.*;public class writefile{	// Main method	public static void main (String args[])	{		// Stream to write file		FileOutputStream write;				try		{		    // Open an output stream		    write = new FileOutputStream ("PayRecord.txt");		    // Print a line of text					    new PrintStream(write).println ("passed In");		    // Close our output stream		    write.close();				}		// Catches any error conditions		catch (IOException e)		{			System.err.println ("Unable to write to file");			System.exit(-1);		}	}	}