
Untitled
By: a guest on
Aug 9th, 2012 | syntax:
None | size: 0.63 KB | hits: 8 | expires: Never
When writing to a file, where is the file saved? [closed]
...
else if (selection.compareTo("H")==0)
try {writeHtmlFile(); } //THIS IS WHERE I CALL ON THE METHOD TO WRITE THE FILE
catch (IOException PartB){
System.out.println("Sorry that file does not exist");
}
...
public static void writeHtmlFile() throws IOException //THIS IS THE METHOD TO WRITE THE FILE
{
FileWriter fwriter = new FileWriter("ChangeDrawer.html");
PrintWriter outputFile = new PrintWriter(fwriter);
outputFile.println("This should work!");
}
...
String curDir = System.getProperty("user.dir");