package zuoye;
import java.util.Date;
public class GetDate {
public static void main(String[] args) {
// TODO 自动生成的方法存根
Date date = new Date();
String hour = String.format("%tH",date);
String minute = String.format("%tM", date);
String secound = String.format("%tS",date);
System.out.println("现在是"+hour+"时,"+minute+"分,"+secound+"秒。");
}
}
10.14
最新推荐文章于 2024-09-03 20:17:53 发布