public class Test01 { public static void main(String[] args) { // TODO Auto-generated method stub Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 08:08:08"); System.out.println(sdf.format(date)); } }
获取当前的日期对象,把它设置为8时8分8秒并打印出来。
猜你喜欢
转载自blog.csdn.net/weixin_39788493/article/details/80728741
今日推荐
周排行