import java.util.*;
public class Time {
public static void main(String[] args) {
// TODO Auto-generated method stub
Date nowTime=new Date();
System.out.println(nowTime);
Calendar calendar=Calendar.getInstance();
calendar.setTime(new Date());
int year=calendar.get(Calendar.YEAR),
month=calendar.get(Calendar.MONTH)+1,
day=calendar.get(Calendar.DAY_OF_MONTH),
hour=calendar.get(Calendar.HOUR_OF_DAY),
minute=calendar.get(Calendar.MINUTE),
second=calendar.get(Calendar.SECOND);
System.out.println("现在时间是:");
System.out.println(""+year+"年"+month+"月"+day+"日");
System.out.println(""+hour+"时"+minute+"分"+second+"秒");
}
}