Java示例滚动月 Java示例滚动时间和月份 Java示例年度周,月 Java示例滚动月 import java.util.Calendar; public class CalendarExample { public static void main(String[] args) { Calendar cal = Calendar.getInstance(); System.out.println("Time:" + cal.getTime()); cal.roll(Calendar.YEAR, false); System.out.println("Time rolling down the year:" + cal.getTime()); cal.roll(Calendar.HOUR, true); System.out.println("Time rolling up the hour:" + cal.getTime()); } } Java示例滚动时间和月份 Java示例年度周,月