Initial commit

This commit is contained in:
2025-11-06 10:29:13 +08:00
commit 0becd14830
318 changed files with 7145 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package ch06;
import java.text.SimpleDateFormat;
import java.util.Date;
public class SimpleDateExample {
public static void main(String[] args) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); //A
Date dt = sdf.parse("2009-8-30"); //B
System.out.println("英文格式:" + dt);
System.out.println();
sdf.applyPattern("yyyy年MM月dd日"); //C
String str = sdf.format(dt); //D
System.out.println("中文格式:" + str);
}
}