blob: 1102049d8cacedb8091780237b233bbceec566b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* Listing2101.java */
import java.io.*;
import java.util.*;
public class Listing2101
{
public static void main(String[] args)
{
File file = new File(args[0]);
GregorianCalendar cal = new GregorianCalendar();
cal.setTime(new Date(file.lastModified()));
System.out.print("Letzte �nderung: ");
System.out.println(
cal.get(Calendar.DATE) + "." +
(cal.get(Calendar.MONTH)+1) + "." +
cal.get(Calendar.YEAR) + " " +
cal.get(Calendar.HOUR_OF_DAY) + ":" +
cal.get(Calendar.MINUTE) + ":" +
cal.get(Calendar.SECOND)
);
}
}
|