User:Mafaraxas/java

import java.io.*;

public class test { public void main { File moo = new File("moo.txt"); OutputStream fout = null;

// Open an output stream try { fout = new FileOutputStream (moo); } catch (FileNotFoundException e) { // 	TODO Auto-generated catch block e.printStackTrace; }

for (int i=0; i<100; i++) { // Print a line of text new PrintStream(fout).println (i);

// Close our output stream try { fout.close; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace; }		}   	} }