Hi,
when I write this piece of
String path="d:\\test.txt";
boolean chk;
File f=new File(path);
try
{
chk=f.createNewFile();
}catch(IOException e)
{
chk=false;
e.printStackTrace();
}
if(chk)
System.out.println("file created.");
else
System.out.println("file not created");
file is created in d-drive
but when I use this
String path="d:\\test.txt";
File f=new File(path);
if(f.createNewFile())
System.out.println("file created.");
else
System.out.println("file not created");
it throws exception.
Please enlighten me on this