View Single Post
  #7 (permalink)  
Old 11-01-2009, 06:53 PM
travishein's Avatar
travishein travishein is offline
Senior Member
 
Join Date: Sep 2009
Location: Canada
Posts: 349
Rep Power: 1
travishein is on a distinguished road
Default
ah,
but that's if invoked with the Formatter(File) constructor.

the Formatter(String) throws exception if file doesn't exist.

Quote:
fileName - The name of the file to use as the destination of this formatter. If the file exists then it will be truncated to zero size;

FileNotFoundException - If the given file name does not denote an existing, writable regular file and a new regular file of that name cannot be created, or if some other error occurs while opening or creating the file
and this would be the constructor invoked here.

Quote:
fileFind = new Formatter("CNDF.txt");
in that case, to do a
Code:
fileFind = new Formatter(new File("CNDF.txt"));
?

Last edited by travishein; 11-01-2009 at 06:58 PM.
Reply With Quote