I experienced a strange behavior from Java
File file = new File("test.txt"); file.reName(new File("test1.txt")); The file successfully rename from test.txt to test1.txt, but if I do
System.out.println(file.getCanonicalPath()); //This return test.txt Is this expected? And what is a clean way to solve this?