关于File类中的long lastModified()的疑问?

Patrick_DK 2002-01-27 03:15:16
下面这个程序,不论1.txt存在与否,f.lastModified()方法返回的都是一个
13位的数字.

我看了文档说这个方法是返回文件修改的最后时间的,为什么会输出这种结果啊?

import java.io.*;

public class SL275
{
public static void main(String[] args)
{
File f=new File("1.txt");
System.out.println(f.lastModified());
}
}
...全文
96 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
aprim 2002-01-27
  • 打赏
  • 举报
回复
A long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or 0L if the file does not exist or if an I/O error occurs

23,407

社区成员

发帖
与我相关
我的任务
社区描述
Java 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧