Java.util.GregorianCalendar.getTimeZone() 方法 Java.util.EnumSet.of() 方法 Java.util.EnumSet.of(E e1,E e2,E e3,E e4) 方法示例 Java.util.GregorianCalendar.getTimeZone() 方法 package com.codingdict; import java.util.*; public class GregorianCalendarDemo { public static void main(String[] args) { // create a new calendar GregorianCalendar cal = (GregorianCalendar) GregorianCalendar.getInstance(); // print the current date and time System.out.println("" + cal.getTime()); // get the time zone and print it System.out.println("Time Zone:" + cal.getTimeZone().getDisplayName()); } } Java.util.EnumSet.of() 方法 Java.util.EnumSet.of(E e1,E e2,E e3,E e4) 方法示例