Page 1 of 1

list of classes which automatically create the file passed in the constructor

Posted: Mon Jun 24, 2013 3:03 am
by The_Nick
In this case I see that If string 1 and string 2 are not real file it does not work.
What are the classes in which if I pass a file it's going to be created automatically? Do we have a list of these classes?
for example I know that the following:

FileReader reader = new FileReader(new File(/home/user/Desktop/indeed.txt);

automatically creates the file without having to code file.createNewFile();

Bottom line: I would like to know if there is a list of classes which automatically create the file passed in the constructor. I see it's not the case of a FileInputStream;

Thanks in advance.

The_Nick.

Re: About Question enthuware.ocpjp.v7.2.1274 :

Posted: Mon Jun 24, 2013 6:23 am
by admin
Please go through the API javadoc for all the File related classes for this.

HTH,
Paul.