FileHandling

When I create file object I pass the pathname to constructor,but I have few confusions say

File fileObj = new File("temp.txt");

where will this file be placed if I dont do it as follows

File fileObj = new File("C:\temp.txt");

also if I use

File fileObj = new File("\temp.txt");where this file should be placed.

[348 byte] By [JK_JAVAa] at [2007-11-26 14:04:55]
# 1

> When I create file object I pass the pathname to

> constructor,but I have few confusions say

> File fileObj = new File("temp.txt");

In the directory where the application was started.

> File fileObj = new File("\temp.txt");where this file

> should be placed.

In the root of the of drive where the applications was started.

Kaj

kajbja at 2007-7-8 1:49:22 > top of Java-index,Java Essentials,New To Java...
# 2
.. The current working directory of the application can also be retrieved by calling System.gerProperty("user.dir");Kaj
kajbja at 2007-7-8 1:49:22 > top of Java-index,Java Essentials,New To Java...
# 3
Thanks!
JK_JAVAa at 2007-7-8 1:49:22 > top of Java-index,Java Essentials,New To Java...