Groovicus wrote: |
Sorry capi. I know you spent a bit of time on that post. |
Groovicus wrote: |
I am not sure that one can accomplish your method with Java though. I have not thought too much about it though, and since it is so easy to do it at a higher level of abstraction, I doubt I will think about it at all. |
Code: |
import java.io.*;
class FileWrite { public static void main(String args[]) { try{ // Create file FileWriter fstream = new FileWriter("out.txt"); BufferedWriter out = new BufferedWriter(fstream); out.write("Hello Java"); //Close the output stream out.close(); }catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); } } } |
output generated using printer-friendly topic mod, All times are GMT + 2 Hours