企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 4-26、如何取得年月日,小时分秒? ``` Calendar c=Calendar.getInstance(); c.set(Calendar.YEAR,2004); c.set(Calendar.MONTH,0); c.set(Calendar.DAY_OF_MONTH,31); System.out.println(c.get(Calendar.YEAR)+" "+(c.get(Calendar.MONTH)+1)+" "+c.get(Calendar.DAY_OF_MONTH)); ```