you must give valid new File object with the new name you want. If the new file object is null, NullPointerException will be thrown
Consider the code:
Line 01 must throw NPE but it doesn't.....a new directory with name "name" is created in the current directory and the programs compiles and runs successfully....
What should i conclude?