-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimeTest.java
More file actions
37 lines (28 loc) · 781 Bytes
/
Copy pathTimeTest.java
File metadata and controls
37 lines (28 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package test;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class TimeTest {
private int a = 10;
private Map<Integer, Integer> testMap = new HashMap<Integer, Integer>();
public static void main(String[] args) {
System.out.println(new Date());
System.out.println(System.currentTimeMillis());
Calendar c = Calendar.getInstance();
c.setTimeInMillis(System.currentTimeMillis());
System.out.println(c.get(Calendar.DAY_OF_WEEK));
}
public int getA() {
return a;
}
public void setA(int a) {
this.a = a;
}
public Map<Integer, Integer> getTestMap() {
return testMap;
}
public void setTestMap(Map<Integer, Integer> testMap) {
this.testMap = testMap;
}
}