This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
In the above code all are working fine. I just created a file "test.txt" and the rename the file by using the "renameTo()" method.
I printed the name of the file by invoking the "getNme()" method. The renameTo() method rename the file "test.txt" to "test1.txt"
but the program prints same for both the print method :
File name :test.txt //before renaming
File name :test.txt //after renaming
So the question is that why the second one "test.txt" why not "test1.txt" while the file "test.txt" is renamed to "test1.txt"