How does file creation work in Java

Posted by Ankur on Stack Overflow See other posts from Stack Overflow or by Ankur
Published on 2010-03-16T07:39:36Z Indexed on 2010/03/16 7:46 UTC
Read the original article Hit count: 180

Filed under:
|
|

I am trying to create a file using

File newFile = new File("myFile");

However no file called "myFile" is created. This is within a Web application Project i.e. proper form to be pakaged as a WAR but I am calling it as part of a main method (just to see how this works).

How can I make it so that a new file is created at a location relative to the current one i.e not have to put in an absolute path.

© Stack Overflow or respective owner

Related posts about java

Related posts about files