Beny's Study
file 사용이력보기 메소드(수정날짜보기) 본문
SimpleDateFormat df = new SimpleDateFormat("yyy-MM-dd hh:mm:ss");
//1. SimpleDateFormat으로 날짜포멧지정
System.out.println(df.format(file1.lastModified()));
//2. lastModified메소드 : 최종수정날짜
//long으로 땡겨 오는 이유 : 보통 time일떄 long로 떙겨옴
'[JAVA] > 11.예외처리' 카테고리의 다른 글
[강의] throw 와 throws (0) | 2022.05.29 |
---|---|
[강의] 예외클래스 종류 (0) | 2022.05.29 |
file 이름바꾸는 메소드 _ .renameTo( ) (0) | 2022.04.20 |
file 권한설정메소드 _ .setWritable( ) (0) | 2022.04.20 |
file 권한확인 메소드 _ canRead,canWrite,canExecute (0) | 2022.04.20 |