File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed
java_test/src/main/java/com/yiyun/inandout Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -27,3 +27,4 @@ java_se/~/
2727/java_ee /.attach *
2828/concurrent /.attach *
2929/out /
30+ /java_test /.attach_pid *
Original file line number Diff line number Diff line change 11package com .yiyun .inandout ;
22
3+ import org .junit .Test ;
4+
35import java .io .BufferedInputStream ;
6+ import java .text .ParseException ;
7+ import java .text .SimpleDateFormat ;
8+ import java .time .LocalDateTime ;
9+ import java .time .format .DateTimeFormatter ;
10+ import java .util .Calendar ;
11+ import java .util .Date ;
412import java .util .Scanner ;
13+ import java .util .logging .SimpleFormatter ;
514
615public class Main {
716 public static void main (String [] args ) {
@@ -11,4 +20,14 @@ public static void main(String[] args) {
1120 System .out .println (nextInt1 );
1221 System .out .println (nextInt2 );
1322 }
23+ @ Test
24+ public void fun () throws ParseException {
25+ SimpleDateFormat simp = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss" );
26+
27+ Date parse = simp .parse ("2014-08-11 21:00:00.000" );
28+ System .out .println ("parse = " +parse );
29+ LocalDateTime now = LocalDateTime .now ();
30+
31+ System .out .println ("now = " + now );
32+ }
1433}
You can’t perform that action at this time.
0 commit comments