After creating the file object in memory , to create the file object in the actual file system you have to create it using the create or createfile method( I forget the exact method name.....)of the file class. Then only would the actual file or dir. come into existance.The creation of the file object in memory does not automatically lead to creation of the actual file on the hard disk.
try this ....
import java.io.*;
public class rat
{
public static void main(String args[])
{
File f = new File("A:book/chapter1");
f.createFile(); // or f.create();
if(f.exists())
System.out.println("true");
if(f.isDirectory())
System.out.println("true");
f.getName();
}
}