日期:2014-05-20 浏览次数:20983 次
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()); } }
1343877668390 1343877669390