public static void main(
String[] args) {
File p = new File("a");
File f = new File(p,"h.txt");
System.out.println(f.getAbsolutePath());
try
{
f.createNewFile();
}
catch(Exception e){System.out.println("test");}
}
In this case,there is no text file is created.But exception is thrown.
Output is
test