Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 9th, 2012  |  syntax: None  |  size: 0.63 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. When writing to a file, where is the file saved? [closed]
  2. ...
  3.      else if (selection.compareTo("H")==0)
  4.         try {writeHtmlFile(); } //THIS IS WHERE I CALL ON THE METHOD TO WRITE THE FILE
  5.         catch (IOException PartB){
  6.              System.out.println("Sorry that file does not exist");
  7.         }
  8.  
  9.  ...
  10.  
  11.  
  12.   public static void writeHtmlFile() throws IOException //THIS IS THE METHOD TO WRITE THE FILE
  13.     {
  14.     FileWriter fwriter = new FileWriter("ChangeDrawer.html");
  15.     PrintWriter outputFile = new PrintWriter(fwriter);
  16.     outputFile.println("This should work!");
  17.  
  18.     }
  19. ...
  20.        
  21. String curDir = System.getProperty("user.dir");