Author Topic:   createNewFile()?
Anju Rao
ranch hand
posted March 08, 2000 02:57 PM         
I am reading Bill Brogden's book today if u haven't guessed already. Here is another question:

I thought when u use File(String path), no file is actually created, right? But he gives a method called
boolean createFile() which creates a file if it doesn't exist.

WOuld appreciate if anybody could clarify this.

Thanks in advance,

maha anna
posted March 08, 2000 03:03 PM             
There is an instance method createNewFile in File class , which creates a new file specified by the abstract path, if the file does not already exist.

Whenever you get doubts like this you first refer to Java Doc. Most of the time you get the answers.
maha anna

Anju Rao
ranch hand
posted March 08, 2000 03:14 PM         
Thanks Maha Anna, i was going to try it out actually. Will do that in future.