public class Test { public static void main(String[] args) { Date date=new Date(); System.out.printf("%tD%n",date); } }
2018/8/20
08/20/18
2018/8/20 19:08:00
08/20/18 19:08:00
public class Test { public static void main(String[] args) { Date date=new Date(); System.out.printf("%tD%n",date); //01/18/20 } }
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题