import java.io.File;
import java.io.IOException;public class Test { /**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
File file = new File("aaa.txt");
file.createNewFile(); try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
} File file1 = new File("aaa1.txt");
file1.createNewFile(); // file1.setLastModified(file.lastModified() + 1); System.out.println(file.lastModified());
System.out.println(file1.lastModified());
}}如以上代码所示, 俩个时间是一样的
请教这是为什么?
import java.io.IOException;public class Test { /**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
File file = new File("aaa.txt");
file.createNewFile(); try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
} File file1 = new File("aaa1.txt");
file1.createNewFile(); // file1.setLastModified(file.lastModified() + 1); System.out.println(file.lastModified());
System.out.println(file1.lastModified());
}}如以上代码所示, 俩个时间是一样的
请教这是为什么?
1343877669390
原来是我看错了, 真不好意思了