Question: When I create a File object like

```
File f = new File("c:")

```

and then call the method `isDirectory()`, it returns `true`. **Why is that?**

The program is suppose to show all files in that directory and works fine except when Im using the "c:". It is not accessing "c:\", not the home path, but the directory the program is executing from. I really don't understand.

Answer: 
In Windows, a current working directory is kept for each drive (A:, B:, C: etc).

When you use a drive without specifying a directory, you are referring to the current working directory of that drive.

```
C:   refers to the current working directory of drive C:
C:\  refers to the root directory of drive C:

```

In your case, the current working directory for C: is the directory where the program file resides.
Try `C:\` instead.

```
File f = new File("C:\\");
System.out.println(f.getAbsolutePath());
System.out.println(f.isDirectory());
System.out.println(f.isFile());

```

Output:

```
C:\
true
false

```